inveniosoftware / react-searchkit

React component library for interacting with a REST API.
https://inveniosoftware.github.io/react-searchkit/
MIT License
78 stars 40 forks source link

EmptyResults: allow custom reset query #217

Closed jrcastro2 closed 2 years ago

jrcastro2 commented 2 years ago
jrcastro2 commented 2 years ago

I think a reset query with a passed payload is an updateQueryState. Is it possible to use that one? You can use the the withState to pass the action to your component.

Thanks a lot! Awesome component the withState.

ntarocco commented 2 years ago

I think a reset query with a passed payload is an updateQueryState. Is it possible to use that one? You can use the the withState to pass the action to your component.

Thanks a lot! Awesome component the withState.

is this still needed then? Or changes needed?

jrcastro2 commented 2 years ago

I think a reset query with a passed payload is an updateQueryState. Is it possible to use that one? You can use the the withState to pass the action to your component.

Thanks a lot! Awesome component the withState.

is this still needed then? Or changes needed?

Yes we need this commit

ntarocco commented 2 years ago

I think a reset query with a passed payload is an updateQueryState. Is it possible to use that one? You can use the the withState to pass the action to your component.

@jrcastro2 I don't understand this comment from Zac: is he asking you to make any change? Or can we merge it?

jrcastro2 commented 2 years ago

I think a reset query with a passed payload is an updateQueryState. Is it possible to use that one? You can use the the withState to pass the action to your component.

@jrcastro2 I don't understand this comment from Zac: is he asking you to make any change? Or can we merge it?

Yes, changes already done, this is ready to be merged.

Some context: At the beginning I updated the resetQuery function to accept the payload as a parameter, but this is already done by updateQueryState that can be accessed if component is wrapped with the withState.