Skip to content
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

feat(ratingMenu): implement canRefine #4691

Merged
merged 3 commits into from
Mar 30, 2021
Merged

Conversation

eunjae-lee
Copy link
Contributor

@eunjae-lee eunjae-lee commented Mar 22, 2021

Summary

implements canRefine in connectRatingMenu as true when nbHits > 0.

DX-1308

Result

ratingMenu now has a canRefine

@eunjae-lee eunjae-lee changed the title feat(ratingMenu): implement caRefine feat(ratingMenu): implement canRefine Mar 22, 2021
@eunjae-lee eunjae-lee requested review from a team, Haroenv and shortcuts and removed request for a team March 22, 2021 14:06

Verified

This commit was signed with the committer’s verified signature.
edolstra Eelco Dolstra
@eunjae-lee eunjae-lee force-pushed the feat/canrefine-rating-menu branch from 205772f to 29b684b Compare March 22, 2021 14:06
@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 22, 2021

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 8d0c9a5:

Sandbox Source
InstantSearch.js Configuration

@@ -327,6 +328,7 @@ ${
return {
items: facetValues,
hasNoResults: results ? results.nbHits === 0 : true,
canRefine: Boolean(results && results.nbHits > 0),
Copy link
Contributor

Choose a reason for hiding this comment

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

instead it should be facetValues.length > 1 I think

Copy link
Contributor

Choose a reason for hiding this comment

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

I think I'm missing somehting.
Isn't canRefine supposed to be on the item level?
My understanding was: canRefine tells you whether you can click (i.e. call refine) on a specific item.

Copy link
Contributor

Choose a reason for hiding this comment

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

it's meant for if you can refine the whole widget, every item can be refined normally

@eunjae-lee eunjae-lee requested review from Haroenv and tkrugg March 30, 2021 09:24
@Haroenv Haroenv merged commit 42191a0 into master Mar 30, 2021
@Haroenv Haroenv deleted the feat/canrefine-rating-menu branch March 30, 2021 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants