NG-ZORRO/ng-zorro-antd

select 支持全局配置 nzOptionHeightPx

xunjianxiang opened this issue · 1 comments

What problem does this feature solve?

更改 select option item 默认高度后,select 下拉列表高度计算异常

常规下拉列表

image

表格分页条数设置

image

What does the proposed API look like?

import { NzConfig, provideNzConfig } from 'ng-zorro-antd/core/config';

const ngZorroConfig: NzConfig = {
  select: { nzOptionHeightPx: 40 },
};

@NgModule({
  declarations: [AppComponent],
  imports: [
    CommonModule
  ],
  providers: [
    provideNzConfig(ngZorroConfig)
  ],
  bootstrap: [AppComponent]
})
export class AppModule {}

Translation of this issue:

SELECT supports global configuration NZOPTIONHEIGHTPX

What PROBLEM DOES This Feature Solve?

After changing the SELECT Option Item default height, the SELECT drop -down list is highly calculated abnormal

Routine drop -down list

! [Image] (https://github.com/ng-zorro/ng-norro-Ntd/assets/130056306/0F44A1-b145-4D2D-971F-20B89735ddc5))))))))

Form Pagling number Settings

! [Image] (https://github.com/ng-zorro/ng-zorro-Ntd/assets/130056306/dde7c187-3209-405-8d5F21CF716A))

What does the proposed api look like?

`` `TypeScript
Import {nzconfig, Providenzconfig} from 'ng-zorro -NTD/core/config';

const ngzorroconfig: nzconfig = {
Select: {nzoptionheightpx: 40},
};

@NgModule ({{
Declarations: [AppComponent],
Imports: [
Commodule
],,,
providers: [[[[[
Providenzconfig (ngzorroconfig)
],,,
bootstrap: [AppComponent]
})
export class appmodule {}
`` `