Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tree-select给nz-tree组件增加nzSearchFunc输入参数 #8707

Open
yjq635 opened this issue Aug 23, 2024 · 1 comment
Open

tree-select给nz-tree组件增加nzSearchFunc输入参数 #8707

yjq635 opened this issue Aug 23, 2024 · 1 comment
Assignees

Comments

@yjq635
Copy link

yjq635 commented Aug 23, 2024

What problem does this feature solve?

支持自定义搜索逻辑,以实现 非title字段的搜索.
比如按拼音或者拼音首字母缩写搜索,可以把中文对应的拼音和对应的拼音首字母缩写以及title拼接起来放在另外一个字段,搜索的时候从这个新字段匹配

What does the proposed API look like?

<nz-tree-select
      style="width: 250px"
      [nzExpandedKeys]="expandKeys"
      [nzNodes]="nodes"
      nzShowSearch
      nzPlaceHolder="Please select"
      [(ngModel)]="value"
      [nzSearchFunc]="nzSearchFunc"
      (ngModelChange)="onChange($event)"
    ></nz-tree-select>
```<!-- generated by ng-zorro-issue-helper. DO NOT REMOVE -->
Copy link

zorro-bot bot commented Aug 23, 2024

Translation of this issue:

TREE-SELECT adds NZSearchfunc input parameters to NZ-Tree components

What PROBLEM DOES This Feature Solve?

Support customized search logic to achieve search for non -Title fields.
For example, search according to Pinyin or Pinyin's first letter abbreviation, you can put the corresponding Pinyin and the corresponding pinyin first letter abbreviation and the title stitching on another field. When searching, it matches this new field.

What does the proposed api look like?

` <nz-time-select style = "width: 250px" [nzexpandedkeys] = "Expandkeys" [nznodes] = "nodes" nzshowsearch nzplaceholder = "Please Select" [(ngmodel)] = "Value" [nzsearchfunc] = "nzsearchFunc" (ngmodelchange) = "Onchange ($ Event)" > </nZ-Tree-SELECT> `

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants