Skip to content

Commit 5a7f470

Browse files
authored
Merge pull request #2078 from LiarYe/master
[IMP]<pro>Select: Extend the addNewOptionPrompt property.
2 parents 10d010d + 81aeba0 commit 5a7f470

5 files changed

Lines changed: 6 additions & 2 deletions

File tree

components-pro/select/Select.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ export interface AddNewOptionPromptResultProps {
127127
disabledTooltip?: TooltipProps;
128128
/** 设置后不再跳转 path */
129129
onClick?: (path: string, record?: Record, field?: Field) => void;
130+
/** 其他配置属性, 可在全局配置 addNewOptionPromptRender 的参数中使用 */
131+
[key: string]: any;
130132
}
131133

132134
export interface SelectPopupContentProps extends TriggerFieldPopupContentProps {

components-pro/select/index.en-US.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ title: Select
8484
| path | 校验权限, 以及跳转页面 | string | |
8585
| disabledTooltip | 禁用时 TooltipProps | TooltipProps | |
8686
| onClick | 按钮点击事件, 使用 path 校验权限, 设置后不再跳转 path | (path: string, record?: Record, field?: Field) => void | |
87+
| \[key: string\] | 其他配置属性, 可在全局配置 addNewOptionPromptRender 的参数中使用 | any | |
8788

8889
<style>
8990
.code-box-demo .c7n-pro-select-wrapper {

components-pro/select/index.zh-CN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ title: Select
8484
| path | 校验权限, 以及跳转页面 | string | |
8585
| disabledTooltip | 禁用时 TooltipProps | TooltipProps | |
8686
| onClick | 按钮点击事件, 使用 path 校验权限, 设置后不再跳转 path | (path: string, record?: Record, field?: Field) => void | |
87+
| \[key: string\] | 其他配置属性, 可在全局配置 addNewOptionPromptRender 的参数中使用 | any | |
8788

8889
<style>
8990
.code-box-demo .c7n-pro-select-wrapper,

components/configure/index.en-US.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ const prefixCls = getConfig('prefixCls');
219219
| selectScrollLoad | Select 组件是否开启选项滚动加载 | boolean | |
220220
| richTextFontFamilies | RichText 组件工具栏字体选择列表,配置的字体需要通过 Quill 注册才能生效 | ({ name: string; family: string })\[\] | |
221221
| selectShowInputPrompt | Select、Lov、TreeSelect可输入时,下拉框中是否显示输入提示。返回 true 或字符串时, 会同时显示到 placeholder 中 | boolean \| ReactNode \| (({ searchable, combo }) => boolean \| ReactNode) \| undefined | |
222-
| addNewOptionPromptRender | Select Lov 新增选项功能渲染函数 | (props: { type: 'prompt' \| 'noDataPrompt'; component: 'Select' \| 'Lov'; renderEmptyComponent: string; record?: Record; field?: Field; code?: string; path: string; disabledTooltip?: TooltipProps; onClick?: (path: string, record?: Record, field?: Field) => void; }) => ReactNode | |
222+
| addNewOptionPromptRender | Select Lov 新增选项功能渲染函数 | (props: { type: 'prompt' \| 'noDataPrompt'; component: 'Select' \| 'Lov'; renderEmptyComponent: string; record?: Record; field?: Field; code?: string; path: string; disabledTooltip?: TooltipProps; onClick?: (path: string, record?: Record, field?: Field) => void; \[key: string\]: any; }) => ReactNode | |
223223

224224
### Customizable
225225

components/configure/index.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ const prefixCls = getConfig('prefixCls');
222222
| selectScrollLoad | Select 组件是否开启选项滚动加载 | boolean | |
223223
| richTextFontFamilies | RichText 组件工具栏字体选择列表,配置的字体需要通过 Quill 注册才能生效 | ({ name: string; family: string })\[\] | |
224224
| selectShowInputPrompt | Select、Lov、TreeSelect可输入时,下拉框中是否显示输入提示。返回 true 或字符串时, 会同时显示到 placeholder 中 | boolean \| ReactNode \| (({ searchable, combo }) => boolean \| ReactNode) \| undefined | |
225-
| addNewOptionPromptRender | Select Lov 新增选项功能渲染函数 | (props: { type: 'prompt' \| 'noDataPrompt'; component: 'Select' \| 'Lov'; renderEmptyComponent: string; record?: Record; field?: Field; code?: string; path: string; disabledTooltip?: TooltipProps; onClick?: (path: string, record?: Record, field?: Field) => void; }) => ReactNode | |
225+
| addNewOptionPromptRender | Select Lov 新增选项功能渲染函数 | (props: { type: 'prompt' \| 'noDataPrompt'; component: 'Select' \| 'Lov'; renderEmptyComponent: string; record?: Record; field?: Field; code?: string; path: string; disabledTooltip?: TooltipProps; onClick?: (path: string, record?: Record, field?: Field) => void; \[key: string\]: any; }) => ReactNode | |
226226

227227
### Customizable
228228

0 commit comments

Comments
 (0)