1
0
Эх сурвалжийг харах

docs: add notice for allowCreate in en-us doc, #1543

pointhalo 2 жил өмнө
parent
commit
f25d8c6032

+ 5 - 1
content/input/select/index-en-US.md

@@ -973,6 +973,10 @@ import { Select, TextArea } from '@douyinfe/semi-ui';
 
 You can create and select entries that do not exist in the options by setting `allowCreate=true` You can customize the content display when creating the label through renderCreateItem (by returning ReactNode, note that you need to customize the style) In addition, can be used with the `defaultActiveFirstOption` property to automatically select the first item. When you enter directly and press Enter, you can immediately create an Option
 
+<Notice title='Notice'>
+  When allowCreate is enabled, it will no longer respond to updates to Children or optionList
+</Notice>
+
 ```jsx live=true
 import React from 'react';
 import { Select } from '@douyinfe/semi-ui';
@@ -1317,7 +1321,7 @@ import { Select, Checkbox } from '@douyinfe/semi-ui';
 
 | Properties | Instructions | Type | Default | version |
 | --- | --- | --- | --- | --- |
-| allowCreate | Whether to allow the user to create new entries. Needs to be used with `filter` | boolean | false |
+| allowCreate | Whether to allow the user to create new entries. Needs to be used with `filter`. When allowCreate is enabled, it will no longer respond to updates to children or optionList | boolean | false |
 | arrowIcon | Customize the right drop-down arrow Icon, when the showClear switch is turned on and there is currently a selected value, hover will give priority to the clear icon  | ReactNode |  | 1.15.0|
 | autoAdjustOverflow | Whether the pop-up layer automatically adjusts the direction when it is obscured (only vertical direction is supported for the time being, and the inserted parent is body) | boolean | true |
 | autoClearSearchValue | After selecting the option, whether to automatically clear the search keywords, it will take effect when mutilple and filter are both enabled | boolean | true | 2.3.0|

+ 1 - 1
content/input/select/index.md

@@ -1380,7 +1380,7 @@ import { Select, Checkbox } from '@douyinfe/semi-ui';
 
 | 属性 | 说明 | 类型 | 默认值 | 版本 |
 | --- | --- | --- | --- | --- |
-| allowCreate | 是否允许用户创建新条目,需配合 filter 使用 | boolean | false |
+| allowCreate | 是否允许用户创建新条目,需配合 filter 使用。该项为true时不再响应 optionList的变更 | boolean | false |
 | arrowIcon | 自定义右侧下拉箭头 Icon,当 showClear 开关打开且当前有选中值时,hover 会优先显示 clear icon | ReactNode |  | 1.15.0 |
 | autoAdjustOverflow | 浮层被遮挡时是否自动调整方向(暂时仅支持竖直方向,且插入的父级为 body) | boolean | true |
 | autoClearSearchValue | 选中选项后,是否自动清空搜索关键字,当 mutilple、filter 都开启时生效 | boolean | true | 2.3.0 |