mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 00:43:53 +00:00
update user select (#2800)
This commit is contained in:
@@ -7,7 +7,6 @@ import { gettext } from '../utils/constants';
|
||||
const propTypes = {
|
||||
placeholder: PropTypes.string.isRequired,
|
||||
onSelectChange: PropTypes.func.isRequired,
|
||||
clearSelect: PropTypes.bool.isRequired,
|
||||
isMulti: PropTypes.bool.isRequired,
|
||||
className: PropTypes.string.isRequired,
|
||||
};
|
||||
@@ -46,10 +45,8 @@ class UserSelect extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
if (nextProps.clearSelect === true && this.props.clearSelect === false) {
|
||||
this.refs.userSelect.select.onChange([], { action: 'clear' });
|
||||
}
|
||||
clearSelect = () => {
|
||||
this.refs.userSelect.select.onChange([], { action: 'clear' });
|
||||
}
|
||||
|
||||
render() {
|
||||
|
Reference in New Issue
Block a user