-
Notifications
You must be signed in to change notification settings - Fork 391
feat(hooks): introduce useNumericMenu
#3237
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit b957fd3:
|
✔️ Deploy Preview for react-instantsearch ready! 🔨 Explore the source changes: c8d5b01 🔍 Inspect the deploy log: https://app.netlify.com/sites/react-instantsearch/deploys/61b3280681511700074eb04e 😎 Browse the preview: https://deploy-preview-3237--react-instantsearch.netlify.app |
✔️ Deploy Preview for react-instantsearch ready! 🔨 Explore the source changes: b957fd3 🔍 Inspect the deploy log: https://app.netlify.com/sites/react-instantsearch/deploys/61b36bef98e2f00008c3f16e 😎 Browse the preview: https://deploy-preview-3237--react-instantsearch.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, I only have comments unrelated to the feature on my side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code lgtm
<div | ||
className={cx( | ||
'ais-NumericMenu', | ||
hasNoResults && 'ais-NumericMenu--noRefinement', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we use canRefine here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not returned by the connector unfortunately. Let's maybe add that in IS.js in a minor, and remove hasNoResults
in the next major?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good, I didn't know this widget was missed
db6e4e1
to
b957fd3
Compare
This adds
useNumericMenu
to our Hooks collection.API
This hook is a bridge to
connectNumericMenu
.Usage