Browse Source

Fix transfer searchPlaceholder

pull/1146/head
afc163 9 years ago
parent
commit
dea88ba37e
  1. 1
      components/transfer/index.jsx
  2. 8
      components/transfer/list.jsx
  3. 2
      components/transfer/search.jsx

1
components/transfer/index.jsx

@ -222,6 +222,7 @@ Transfer.defaultProps = {
operations: [],
showSearch: false,
searchPlaceholder: '请输入搜索内容',
notFoundContent: '请输入搜索内容',
body: noop,
footer: noop,
};

8
components/transfer/list.jsx

@ -70,7 +70,7 @@ class TransferList extends Component {
render() {
const { prefixCls, dataSource, titleText, filter, checkedKeys,
checkStatus, body, footer, showSearch } = this.props;
checkStatus, body, footer, showSearch, searchPlaceholder } = this.props;
// Custom Layout
const footerDom = footer({ ...this.props });
@ -109,7 +109,11 @@ class TransferList extends Component {
{ bodyDom ||
<div className={ showSearch ? `${prefixCls}-body ${prefixCls}-body-with-search` : `${prefixCls}-body`}>
{ showSearch ? <div className={`${prefixCls}-body-search-wrapper`}>
<Search prefixCls={`${prefixCls}-search`} onChange={this.handleFilter.bind(this)} handleClear={this.handleClear.bind(this)} value={filter} />
<Search prefixCls={`${prefixCls}-search`}
onChange={this.handleFilter.bind(this)}
handleClear={this.handleClear.bind(this)}
placeholder={searchPlaceholder}
value={filter} />
</div> : null }
<Animate component="ul"
transitionName={this.state.mounted ? `${prefixCls}-highlight` : ''}

2
components/transfer/search.jsx

@ -31,7 +31,7 @@ class Search extends Component {
}
Search.defaultProps = {
placeholder: '请输入搜索内容',
placeholder: '',
onChange: noop,
handleClear: noop,
};

Loading…
Cancel
Save