Skip to content

Commit f3d0e23

Browse files
zkwolftangjinzhou
authored andcommitted
feat: select add maxTagTextLength prop (#1217)
* feat: select add maxTagTextLenth prop * fix: add select maxTagTextLength prop ts type
1 parent c9107da commit f3d0e23

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

components/select/index.en-US.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
| labelInValue | whether to embed label in value, turn the format of value from `string` to `{key: string, label: vNodes}` | boolean | false |
2828
| maxTagCount | Max tag count to show | number | - |
2929
| maxTagPlaceholder | Placeholder for not showing tags | slot/function(omittedValues) | - |
30+
| maxTagTextLength | Max text length to show | number | - |
3031
| mode | Set mode of Select | 'default' \| 'multiple' \| 'tags' | 'default' |
3132
| notFoundContent | Specify content to show when no result matches.. | string\|slot | 'Not Found' |
3233
| optionFilterProp | Which prop value of option will be used for filter if filterOption is true | string | value |

components/select/index.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ const SelectProps = {
6464
firstActiveValue: PropTypes.oneOfType([String, PropTypes.arrayOf(String)]),
6565
maxTagCount: PropTypes.number,
6666
maxTagPlaceholder: PropTypes.any,
67+
maxTagTextLength: PropTypes.number,
6768
dropdownMatchSelectWidth: PropTypes.bool,
6869
optionFilterProp: PropTypes.string,
6970
labelInValue: PropTypes.boolean,

components/select/index.zh-CN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
| labelInValue | 是否把每个选项的 label 包装到 value 中,会把 Select 的 value 类型从 `string` 变为 `{key: string, label: vNodes}` 的格式 | boolean | false |
2727
| maxTagCount | 最多显示多少个 tag | number | - |
2828
| maxTagPlaceholder | 隐藏 tag 时显示的内容 | slot/function(omittedValues) | - |
29+
| maxTagTextLength | 最大显示的 tag 文本长度 | number | - |
2930
| mode | 设置 Select 的模式为多选或标签 | 'default' \| 'multiple' \| 'tags' \| 'combobox' | - |
3031
| notFoundContent | 当下拉列表为空时显示的内容 | string\|slot | 'Not Found' |
3132
| optionFilterProp | 搜索时过滤对应的 option 属性,如设置为 children 表示对内嵌内容进行搜索 | string | value |

types/select/select.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@ export declare class Select extends AntdComponent {
118118
*/
119119
maxTagPlaceholder: any;
120120

121+
/**
122+
* Max text length to show
123+
* @type number
124+
*/
125+
maxTagTextLength: number;
126+
121127
/**
122128
* Set mode of Select
123129
* @default 'default'

0 commit comments

Comments
 (0)