-
Notifications
You must be signed in to change notification settings - Fork 541
fix(hitsPerPageSelector): Issue when state did not have a hitsPerPage
#450
New issue
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
Conversation
WFM, widgets should not be dependent from other widget instantiation |
fix(hitsPerPageSelector): Issue when state did not have a `hitsPerPage`
@vvo 2fast2merge We just talked with @ElPicador and here is the breakdown: The hits widget has a default value on To solve it in the docs, it's easy, just add I'm seeing one issue with it though, if there was a specific |
It is undefined if you have not instantiated a hits widget OR if you have your own way to display the hits (custom widget). Then state.hitsPerPage is not mandatory, you may just want to use the one from the index parameters/key etc..? That's why I added "widgets should not be dependent from other widget instantiation" which was the case here before this fix. You should be able to instantiate the hitsPerPage widget whether or not you have a hits widget or a custom hits widget or maybe no hits widget at all at this point (because you are building the interface asynchronously etc..) |
For me we shouldn't silently let it go, you never want to have no selected value on a hits per page selector. And this PR works for undefined, but not for any number that isn't in the options. |
I do not understand the issue for this one, can you give an example? |
I fail at seeing every cases/issues here so if you have another proposition @jerskouille go for it. |
Thanks to @jerskouille we found more issues linked to this one, will do some more changes |
Removes the dependency on hitsPerPage. Follow-up of #450.
Removes the dependency on hitsPerPage. Follow-up of #450.
Removes the dependency on hitsPerPage. Follow-up of #450.
Removes the dependency on hitsPerPage. Follow-up of #450.
No description provided.