mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 05:05:48 +08:00
Fix TreeSelect placeholder not work in demo, close #3433
不用写到 changelog 里,只是 demo 的问题
This commit is contained in:
parent
3169d45246
commit
38cec5fd11
@ -20,7 +20,7 @@ const TreeNode = TreeSelect.TreeNode;
|
||||
const Demo = React.createClass({
|
||||
getInitialState() {
|
||||
return {
|
||||
value: '',
|
||||
value: undefined,
|
||||
};
|
||||
},
|
||||
onChange(value) {
|
||||
|
@ -39,7 +39,7 @@ const treeData = [{
|
||||
const Demo = React.createClass({
|
||||
getInitialState() {
|
||||
return {
|
||||
value: '',
|
||||
value: undefined,
|
||||
};
|
||||
},
|
||||
onChange(value) {
|
||||
|
@ -28,7 +28,7 @@ export default class TreeSelect extends React.Component<TreeSelectProps, any> {
|
||||
render() {
|
||||
const props = this.props;
|
||||
let {
|
||||
size, className, combobox, notFoundContent, prefixCls,
|
||||
size, className, notFoundContent, prefixCls,
|
||||
} = this.props;
|
||||
|
||||
const cls = classNames({
|
||||
@ -42,17 +42,14 @@ export default class TreeSelect extends React.Component<TreeSelectProps, any> {
|
||||
notFoundContent = notFoundContent || antLocale.Select.notFoundContent;
|
||||
}
|
||||
|
||||
if (combobox) {
|
||||
notFoundContent = null;
|
||||
}
|
||||
|
||||
let checkable = props.treeCheckable;
|
||||
if (checkable) {
|
||||
checkable = <span className={`${prefixCls}-tree-checkbox-inner`}></span>;
|
||||
}
|
||||
|
||||
return (
|
||||
<RcTreeSelect {...this.props}
|
||||
<RcTreeSelect
|
||||
{...this.props}
|
||||
treeCheckable={checkable}
|
||||
className={cls}
|
||||
notFoundContent={notFoundContent}
|
||||
|
Loading…
Reference in New Issue
Block a user