We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have react-filter-box embedded into a component that reads the options dynamically from a database on componentDidMount.
componentDidMount
<ReactFilterBox options={this.state.optionsFromDatabase} />
does reinitialise the options.
The text was updated successfully, but these errors were encountered:
@panigrah this should be possible with key prop, so when you have a new options to load you can change the key value.
key
Example
class MyComponents extends React.Component { state = { key: 1, options: [], } async componentDidMount() { const newOptions = await getDBData() this.setState({ key: this.state.key + 1, options: newOptions }) } render() { return ( <ReactFilterBox options={this.state.optionsFromDatabase} key={this.state.key} /> ) } }
Sorry, something went wrong.
No branches or pull requests
I have react-filter-box embedded into a component that reads the options dynamically from a database on
componentDidMount
.<ReactFilterBox options={this.state.optionsFromDatabase} />
does reinitialise the options.
The text was updated successfully, but these errors were encountered: