-
Notifications
You must be signed in to change notification settings - Fork 157
feat(can-refine): provide canRefine
for multiple widget slots
#1141
Conversation
…panel `canRefine`
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 1eb35a0:
|
src/components/HitsPerPage.vue
Outdated
@@ -43,7 +44,7 @@ export default { | |||
} | |||
), | |||
createPanelConsumerMixin({ | |||
mapStateToCanRefine: state => state.hasNoResults === false, | |||
mapStateToCanRefine: state => Boolean(state.canRefine), |
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.
Isn't state.canRefine
already a boolean?
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.
Not always, it might be undefined
, see here : #876
Should I maybe mention it in a comment or would it be redundant ?
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.
I see, thanks! I don't think there is a need to add a comment in that case.
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.
👍
Co-authored-by: Haroen Viaene <hello@haroen.me>
Following FX-740, we want to provide
canRefine
to slots and use it forcreatePanelConsumerMixin()