UX improvement: disabled on blur input reset for the search bar (#1217)
diff --git a/app/addons/components/components/throttledreacselect.js b/app/addons/components/components/throttledreacselect.js
index 1fd66e3..a5df5e7 100644
--- a/app/addons/components/components/throttledreacselect.js
+++ b/app/addons/components/components/throttledreacselect.js
@@ -15,7 +15,6 @@
import ReactSelect from "react-select";
export class ThrottledReactSelectAsync extends React.Component {
-
constructor(props) {
super(props);
this.lastCall = undefined;
@@ -38,13 +37,14 @@
render() {
// wrapThrottler() must be called here to ensure a new
// function is created when props.loadOptions is updated
- const throttledLoadOptions = this.wrapThrottler(this.props.loadOptions).bind(this);
+ const throttledLoadOptions = this.wrapThrottler(
+ this.props.loadOptions
+ ).bind(this);
const newProps = {
...this.props,
- loadOptions: throttledLoadOptions
+ loadOptions: throttledLoadOptions,
+ onBlurResetsInput: false
};
- return (
- <ReactSelect.Async {...newProps} />
- );
+ return <ReactSelect.Async {...newProps} />;
}
}