-
Notifications
You must be signed in to change notification settings - Fork 386
fix(StarRatings): always show the stars below #929
Conversation
Deploy preview for react-instantsearch ready! Built with commit 7b2c249 |
@samouss nothing seems to happen in the playground now 🤔 |
1ff6ef9
to
0fcbcf2
Compare
0fcbcf2
to
4064e0c
Compare
isLastSelectableItem: range.length - 1 === index, | ||
max: limitMax, | ||
translate, | ||
createURL, |
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.
why is refine
not in this object anymore?
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.
Take a look at the signature of buildItem
refine is not used. We access the function through the props
.
react-instantsearch/packages/react-instantsearch/src/components/StarRating.js
Lines 52 to 59 in 4064e0c
buildItem({ | |
max, | |
lowerBound, | |
count, | |
translate, | |
createURL, | |
isLastSelectableItem, | |
}) { |
4064e0c
to
7b2c249
Compare
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.
LGTM this seems logical now
<a name="4.5.0"></a> # [4.5.0](v4.4.2...v4.5.0) (2018-02-06) ### Bug Fixes * **connectRange:** use the same behaviour for currentRefinement in getMetadata ([#923](#923)) ([08917b6](08917b6)) * **connectToggle:** use currentRefinement in metadata instead of the label ([#909](#909)) ([89cae2b](89cae2b)) * **StarRatings:** always show the stars below ([#929](#929)) ([22bf93a](22bf93a)) ### Features * **connectStateResults:** expose isSearchStalled ([#933](#933)) ([f45ba27](f45ba27))
Summary
Fix #674
In the current implementation we can have sparse rows when the results only return one facet value or if some numeric filters (ex: rating > 3) are applied. Now all the rows under the highest value are filled. Since the v5 is in
beta
I didn't update the tests for avoid to much conflict at the merge. But we should get rid of thereact-test-renderer
forenzyme
. Same for the component we could move to a SFC after the merge.Before:
After:
You can play with the widget on Storybook.