From 38cec5fd11ec6cf8b958749495a25fa23be64f7c Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 15 Oct 2016 15:28:55 +0800 Subject: [PATCH] Fix TreeSelect placeholder not work in demo, close #3433 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 不用写到 changelog 里,只是 demo 的问题 --- components/tree-select/demo/basic.md | 2 +- components/tree-select/demo/treeData.md | 2 +- components/tree-select/index.tsx | 9 +++------ 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/components/tree-select/demo/basic.md b/components/tree-select/demo/basic.md index 99ae31b891..d78e4fabb7 100644 --- a/components/tree-select/demo/basic.md +++ b/components/tree-select/demo/basic.md @@ -20,7 +20,7 @@ const TreeNode = TreeSelect.TreeNode; const Demo = React.createClass({ getInitialState() { return { - value: '', + value: undefined, }; }, onChange(value) { diff --git a/components/tree-select/demo/treeData.md b/components/tree-select/demo/treeData.md index 1b05b81643..327a0a28b2 100644 --- a/components/tree-select/demo/treeData.md +++ b/components/tree-select/demo/treeData.md @@ -39,7 +39,7 @@ const treeData = [{ const Demo = React.createClass({ getInitialState() { return { - value: '', + value: undefined, }; }, onChange(value) { diff --git a/components/tree-select/index.tsx b/components/tree-select/index.tsx index 2b50f0b09a..daabb135c5 100644 --- a/components/tree-select/index.tsx +++ b/components/tree-select/index.tsx @@ -28,7 +28,7 @@ export default class TreeSelect extends React.Component { 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 { notFoundContent = notFoundContent || antLocale.Select.notFoundContent; } - if (combobox) { - notFoundContent = null; - } - let checkable = props.treeCheckable; if (checkable) { checkable = ; } return ( -