Closed divyanshu013 closed 6 years ago
Hello,
The same happens with the app={app} prop. If I try to rerender the <ReactiveBase />
based on the app prop change nothing happens.
If I try something like this:
class ReactiveBaseContainer extends Component {
shouldComponentUpdate(nextProps) {
const differentIndex = this.props.app !== nextProps.app;
return differentIndex;
}
render() {
return (
<ReactiveBase
app={this.props.app}
url="https://someUrl.com"
>
{this.props.children}
</ReactiveBase>
);
}
}
export default ReactiveBaseContainer;
The render is called and the props.app changed but it always displays the first render.
Do you have an estimation of how long it will take to fix this bug?
Thanks!
Fixed here - c79c60f. We will roll this out in the upcoming release today. 🎉
Please note that we don't recommend updating the
ReactiveBase
's props in general (unless you know what you're doing), as it requires us to reset the internal reactivesearch-redux-store and remount all the underlying components in order to fetch the relevant data.
Thanks! It was really fast!
The problem is the data that I'm using comes from two different elasticSearch index. So I'm trying to use a dropdown where I can pick the index that I want to search:
Not sure if there is a better way of doing this without updating the ReactiveBase
's props. Any suggestions?
Given your use-case, it makes perfect sense to update the ReactiveBase's props 👍
PS: The UI looks great. We would love to hear your feedback/thoughts on using reactivesearch in production. 🐱
Released in v2.6.6
Issue Type:
Bug
Platform:
Web
Description:
When trying to update the
type
of the Elasticsearch via the prop, it doesn't update dynamically (when the component re-renders).Reactivesearch version: 2.6.2