mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-02 13:56:40 +08:00
Fix transfer searchPlaceholder
This commit is contained in:
parent
a919e9e414
commit
dea88ba37e
@ -222,6 +222,7 @@ Transfer.defaultProps = {
|
|||||||
operations: [],
|
operations: [],
|
||||||
showSearch: false,
|
showSearch: false,
|
||||||
searchPlaceholder: '请输入搜索内容',
|
searchPlaceholder: '请输入搜索内容',
|
||||||
|
notFoundContent: '请输入搜索内容',
|
||||||
body: noop,
|
body: noop,
|
||||||
footer: noop,
|
footer: noop,
|
||||||
};
|
};
|
||||||
|
@ -70,7 +70,7 @@ class TransferList extends Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { prefixCls, dataSource, titleText, filter, checkedKeys,
|
const { prefixCls, dataSource, titleText, filter, checkedKeys,
|
||||||
checkStatus, body, footer, showSearch } = this.props;
|
checkStatus, body, footer, showSearch, searchPlaceholder } = this.props;
|
||||||
|
|
||||||
// Custom Layout
|
// Custom Layout
|
||||||
const footerDom = footer({ ...this.props });
|
const footerDom = footer({ ...this.props });
|
||||||
@ -109,7 +109,11 @@ class TransferList extends Component {
|
|||||||
{ bodyDom ||
|
{ bodyDom ||
|
||||||
<div className={ showSearch ? `${prefixCls}-body ${prefixCls}-body-with-search` : `${prefixCls}-body`}>
|
<div className={ showSearch ? `${prefixCls}-body ${prefixCls}-body-with-search` : `${prefixCls}-body`}>
|
||||||
{ showSearch ? <div className={`${prefixCls}-body-search-wrapper`}>
|
{ 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 }
|
</div> : null }
|
||||||
<Animate component="ul"
|
<Animate component="ul"
|
||||||
transitionName={this.state.mounted ? `${prefixCls}-highlight` : ''}
|
transitionName={this.state.mounted ? `${prefixCls}-highlight` : ''}
|
||||||
|
@ -31,7 +31,7 @@ class Search extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Search.defaultProps = {
|
Search.defaultProps = {
|
||||||
placeholder: '请输入搜索内容',
|
placeholder: '',
|
||||||
onChange: noop,
|
onChange: noop,
|
||||||
handleClear: noop,
|
handleClear: noop,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user