I am building a dashboard using reactiveSearch that contains some filters (MultiList) say Countries, Status etc. And I have a table with some rows rendered in reactiveList.
I have a toolbar which I am using to change particular properties on the table. For example if I need to change the status of the row from pending to on-Hold (This toolbar is not a reactiveSearch component). Based on the feedback from the status change call how do I rerender the reactiveBase component to update the count and update the row to reflect the updated status.
Couple of options I tried is 1) Set the MultiList filter value to random while the status update is happening and to the actual value back when the status update is completed so as to trigger a rerender. But this is not updating the count of the filters. And also the status of the table rows is not consistently updating.
2) reload the webpage (this works but want to save it as a last resort)
// reactjs
<MultiList
componentId="stateFilter"
dataField="state"
value={this.state.stateValue}
onChange ={this.onChange}
...
/>
shouldComponentUpdate(nextProps, nextState) {
if(this.props.isStateSaving && !nextProps.isStateSaving) {
this.setState({ stateValue : [] });
} else {
this.setState({ stateValue : ['All States'] });
}
return true;
}
Expected result is when state is saved, the count of filter and table row should be update to reflect the actual state.