appbaseio / reactivesearch

Search UI components for React and Vue
https://opensource.appbase.io/reactivesearch
Apache License 2.0
4.89k stars 468 forks source link

Upgraded to 2.5.0 from 2.3.3 - TypeError: nextProps.defaultQuery is not a function #330

Closed joelrojo closed 6 years ago

joelrojo commented 6 years ago

Issue Type: Bug

Platform: ReactiveSearch Web

Description: I updated to 2.5.0 from 2.3.3 in order to us the onNoResults prop on ReactiveList, but not my search isn't working. I'm getting the error below:

TypeError: nextProps.defaultQuery is not a function
ReactiveComponent.componentWillReceiveProps
node_modules/@appbaseio/reactivesearch/lib/components/basic/ReactiveComponent.js:93
  90 | }
  91 | console.log("PROPS")
  92 | console.log(nextProps);
> 93 | if (!(0, _helper.isEqual)(nextProps.defaultQuery(), this.defaultQuery)) {
  94 |  this.defaultQuery = nextProps.defaultQuery();
  95 | 
  96 |  var _ref2 = this.defaultQuery || {},

I tried defining a defaultQuery prop to see if maybe that was the issue, but still received this on any search and any page on the app.

siddharthlatest commented 6 years ago

@joelrojo We are aware about the issue, a patch release with this and a couple of other fixes should be out within a day.

metagrover commented 6 years ago

Fixed in v2.5.1 🎉