Fix TreeSelect placeholder not work in demo, close #3433

不用写到 changelog 里,只是 demo 的问题
This commit is contained in:
afc163 2016-10-15 15:28:55 +08:00
parent 3169d45246
commit 38cec5fd11
3 changed files with 5 additions and 8 deletions

View File

@ -20,7 +20,7 @@ const TreeNode = TreeSelect.TreeNode;
const Demo = React.createClass({
getInitialState() {
return {
value: '',
value: undefined,
};
},
onChange(value) {

View File

@ -39,7 +39,7 @@ const treeData = [{
const Demo = React.createClass({
getInitialState() {
return {
value: '',
value: undefined,
};
},
onChange(value) {

View File

@ -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}