Skip to content

feat: select add maxTagTextLength prop #1217

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

Merged
merged 2 commits into from
Sep 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions components/select/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
| labelInValue | whether to embed label in value, turn the format of value from `string` to `{key: string, label: vNodes}` | boolean | false |
| maxTagCount | Max tag count to show | number | - |
| maxTagPlaceholder | Placeholder for not showing tags | slot/function(omittedValues) | - |
| maxTagTextLength | Max text length to show | number | - |
| mode | Set mode of Select | 'default' \| 'multiple' \| 'tags' | 'default' |
| notFoundContent | Specify content to show when no result matches.. | string\|slot | 'Not Found' |
| optionFilterProp | Which prop value of option will be used for filter if filterOption is true | string | value |
Expand Down
1 change: 1 addition & 0 deletions components/select/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ const SelectProps = {
firstActiveValue: PropTypes.oneOfType([String, PropTypes.arrayOf(String)]),
maxTagCount: PropTypes.number,
maxTagPlaceholder: PropTypes.any,
maxTagTextLength: PropTypes.number,
dropdownMatchSelectWidth: PropTypes.bool,
optionFilterProp: PropTypes.string,
labelInValue: PropTypes.boolean,
Expand Down
1 change: 1 addition & 0 deletions components/select/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
| labelInValue | 是否把每个选项的 label 包装到 value 中,会把 Select 的 value 类型从 `string` 变为 `{key: string, label: vNodes}` 的格式 | boolean | false |
| maxTagCount | 最多显示多少个 tag | number | - |
| maxTagPlaceholder | 隐藏 tag 时显示的内容 | slot/function(omittedValues) | - |
| maxTagTextLength | 最大显示的 tag 文本长度 | number | - |
| mode | 设置 Select 的模式为多选或标签 | 'default' \| 'multiple' \| 'tags' \| 'combobox' | - |
| notFoundContent | 当下拉列表为空时显示的内容 | string\|slot | 'Not Found' |
| optionFilterProp | 搜索时过滤对应的 option 属性,如设置为 children 表示对内嵌内容进行搜索 | string | value |
Expand Down
6 changes: 6 additions & 0 deletions types/select/select.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ export declare class Select extends AntdComponent {
*/
maxTagPlaceholder: any;

/**
* Max text length to show
* @type number
*/
maxTagTextLength: number;

/**
* Set mode of Select
* @default 'default'
Expand Down