Feat:TreeSelect支持创建顶层节点 (#5377)

* feat: TreeSelect支持创建顶层节点

Co-authored-by: liqiu03 <liqiu03@baidu.com>
This commit is contained in:
Aqiu 2022-10-12 15:26:52 +08:00 committed by GitHub
parent 45791436cd
commit 90d430114a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -116,6 +116,7 @@ export default class TreeSelectControl extends React.Component<
TreeSelectState
> {
static defaultProps = {
hideRoot: true,
placeholder: 'Select.placeholder',
optionsPlaceholder: 'placeholder.noData',
multiple: false,
@ -524,7 +525,8 @@ export default class TreeSelectControl extends React.Component<
expandTreeOptions,
selfDisabledAffectChildren,
showOutline,
autoCheckChildren
autoCheckChildren,
hideRoot
} = this.props;
let filtedOptions =
@ -560,7 +562,7 @@ export default class TreeSelectControl extends React.Component<
showOutline={showOutline}
cascade={cascade}
foldedField="collapsed"
hideRoot
hideRoot={hideRoot}
value={value || ''}
nodePath={nodePath}
enableNodePath={enableNodePath}