Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

feat(can-refine): provide canRefine for multiple widget slots #1141

Merged
merged 6 commits into from
Sep 7, 2022

Conversation

aymeric-giraudet
Copy link
Member

@aymeric-giraudet aymeric-giraudet commented Aug 30, 2022

Following FX-740, we want to provide canRefine to slots and use it for createPanelConsumerMixin()

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 30, 2022

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:

Sandbox Source
vue-instantsearch-e-commerce Configuration

@@ -43,7 +44,7 @@ export default {
}
),
createPanelConsumerMixin({
mapStateToCanRefine: state => state.hasNoResults === false,
mapStateToCanRefine: state => Boolean(state.canRefine),
Copy link
Member

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?

Copy link
Member Author

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 ?

Copy link
Member

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.

Copy link
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

src/mixins/panel.js Outdated Show resolved Hide resolved
src/mixins/panel.js Outdated Show resolved Hide resolved
@aymeric-giraudet aymeric-giraudet merged commit 424316d into master Sep 7, 2022
@aymeric-giraudet aymeric-giraudet deleted the feat/has-no-results-can-refine branch September 7, 2022 07:37
Haroenv pushed a commit to algolia/instantsearch that referenced this pull request Dec 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants