Skip to content

Commit

Permalink
Fix issues in access manager (geosolutions-it#1354)
Browse files Browse the repository at this point in the history
* Fix issues in access manager

 - Due to the update, we have to apply this fix to the RuleAttributeSelect to re-enable inline search

* Removed loading and minor fixes

On input change, set loding make the things break, because the state is managed internally.

This fixes the select to work in both sync and async ways.
  • Loading branch information
offtherailz authored Dec 19, 2016
1 parent c9a8297 commit 049e47e
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ const RuleAttributeSelect = React.createClass({
},
getDefaultProps() {
return {
loadOptions: () => [],
loadOptions: () => {},
onInputChange: () => {},
onValueUpdated: () => [],
onValueUpdated: () => {},
options: [],
disabled: false,
paginated: false,
Expand Down Expand Up @@ -114,11 +114,11 @@ const RuleAttributeSelect = React.createClass({
}
this.props.loadOptions();
}}
searchable={true}
matchPos="any"
matchProp="any"
clearable={this.props.clearable}
onInputChange={(input) => {
if (!this.props.staticValues) {
this.setState({loading: true});
}
this.props.onInputChange(input);
}}
options={this.state.loading ? [] : options}
Expand Down

0 comments on commit 049e47e

Please sign in to comment.