mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06:28 +08:00
fix comments
This commit is contained in:
parent
7b8007087a
commit
509a368e56
@ -109,22 +109,22 @@ class Transfer extends Component {
|
||||
}
|
||||
|
||||
this.setState({
|
||||
[direction === 'left' ? 'leftCheckedKeys' : 'rightCheckedKeys']: holder,
|
||||
[direction + 'CheckedKeys']: holder,
|
||||
});
|
||||
}
|
||||
|
||||
handleFilter(direction, e) {
|
||||
this.setState({
|
||||
// deselect all
|
||||
[direction === 'left' ? 'leftCheckedKeys' : 'rightCheckedKeys']: [],
|
||||
[direction + 'CheckedKeys']: [],
|
||||
// add filter
|
||||
[direction === 'left' ? 'leftFilter' : 'rightFilter']: e.target.value,
|
||||
[direction + 'Filter']: e.target.value,
|
||||
});
|
||||
}
|
||||
|
||||
handleClear(direction) {
|
||||
this.setState({
|
||||
[direction === 'left' ? 'leftFilter' : 'rightFilter']: '',
|
||||
[direction + 'Filter']: '',
|
||||
});
|
||||
}
|
||||
|
||||
@ -139,7 +139,7 @@ class Transfer extends Component {
|
||||
holder.push(selectedItem.key);
|
||||
}
|
||||
this.setState({
|
||||
[direction === 'left' ? 'leftCheckedKeys' : 'rightCheckedKeys']: holder,
|
||||
[direction + 'CheckedKeys']: holder,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
|
||||
import Icon from '../icon';
|
||||
function noop() {
|
||||
}
|
||||
|
||||
@ -18,9 +18,10 @@ class Search extends Component {
|
||||
<input placeholder={placeholder} className={ prefixCls + ' ant-input' } value={ value } ref="input"
|
||||
onChange={this.handleChange.bind(this)}/>
|
||||
{ value && value.length > 0 ?
|
||||
<a href="javascirpt:;" className={ prefixCls + '-action' } onClick={this.props.handleClear}><i
|
||||
className="anticon anticon-cross-circle"></i></a>
|
||||
: <span className={ prefixCls + '-action' }><i className="anticon anticon-search"></i></span>
|
||||
<a href="javascirpt:;" className={ prefixCls + '-action' } onClick={this.props.handleClear}>
|
||||
<Icon type="cross-circle" />
|
||||
</a>
|
||||
: <span className={ prefixCls + '-action' }><Icon type="search" /></span>
|
||||
}
|
||||
</div>;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
&-header {
|
||||
padding: 7px 16px;
|
||||
border-radius: 5px 5px 0 0;
|
||||
border-radius: 6px 6px 0 0;
|
||||
background: #fff;
|
||||
color: #666;
|
||||
border-bottom: 1px solid #e9e9e9;
|
||||
|
Loading…
Reference in New Issue
Block a user