Skip to content

Commit

Permalink
fix(pro:search): name select label not rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
sallerli1 committed Mar 6, 2023
1 parent 1be87e8 commit f7976df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/pro/search/demo/RemoteSearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ title:

## zh

`'select'``'treeSelect'` 类型搜索项支持服务端搜索。
`'select'``'treeSelect'``'cascader'` 类型搜索项支持服务端搜索。

## en

Server-side searching is supported under field type of `'select'`, `'treeSelect'`.
Server-side searching is supported under field type of `'select'`, `'treeSelect'`, `'cascader'`.
2 changes: 1 addition & 1 deletion packages/pro/search/src/segments/CreateNameSegment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function createNameSegment(

const panelSlots = {
optionLabel: isString(_customNameLabel)
? (option: SelectPanelData) => renderNameLabel(option.key, slots[_customNameLabel])
? slots[_customNameLabel] && ((option: SelectPanelData) => renderNameLabel(option.key, slots[_customNameLabel]))
: (option: SelectPanelData) => renderNameLabel(option.key, _customNameLabel),
}

Expand Down

0 comments on commit f7976df

Please sign in to comment.