소스 검색

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

pointhalo 2 년 전
부모
커밋
f25d8c6032
2개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 1
      content/input/select/index-en-US.md
  2. 1 1
      content/input/select/index.md

+ 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
 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
 ```jsx live=true
 import React from 'react';
 import React from 'react';
 import { Select } from '@douyinfe/semi-ui';
 import { Select } from '@douyinfe/semi-ui';
@@ -1317,7 +1321,7 @@ import { Select, Checkbox } from '@douyinfe/semi-ui';
 
 
 | Properties | Instructions | Type | Default | version |
 | 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|
 | 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 |
 | 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|
 | 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 |
 | arrowIcon | 自定义右侧下拉箭头 Icon,当 showClear 开关打开且当前有选中值时,hover 会优先显示 clear icon | ReactNode |  | 1.15.0 |
 | autoAdjustOverflow | 浮层被遮挡时是否自动调整方向(暂时仅支持竖直方向,且插入的父级为 body) | boolean | true |
 | autoAdjustOverflow | 浮层被遮挡时是否自动调整方向(暂时仅支持竖直方向,且插入的父级为 body) | boolean | true |
 | autoClearSearchValue | 选中选项后,是否自动清空搜索关键字,当 mutilple、filter 都开启时生效 | boolean | true | 2.3.0 |
 | autoClearSearchValue | 选中选项后,是否自动清空搜索关键字,当 mutilple、filter 都开启时生效 | boolean | true | 2.3.0 |