1
0
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:
Michael An
2019-01-10 10:01:49 +08:00
committed by Daniel Pan
parent f5e2c6673b
commit 60f542ea9e
2 changed files with 4 additions and 9 deletions

View File

@@ -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() {