Skip to content

Commit 34c5e21

Browse files
committed
Add compatibility with ratingsMenu
1 parent 8280f0b commit 34c5e21

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ List of all the components that are available in [instantSearch](https://github.
219219
-[MenuSelect](#-menuselect)
220220
-[ToggleRefinement](#-togglerefinement)
221221
-[NumericMenu](#-numericmenu)
222-
- [RatingMenu](#-ratingmenu)
222+
- [RatingMenu](#-ratingmenu)
223223
-[ClearRefinements](#-clearrefinements)
224224
-[Pagination](#-pagination)
225225
-[HitsPerPage](#-hitsperpage)
@@ -798,13 +798,19 @@ The `numericMenu` widget displays a list of numeric filters in a list. Those num
798798
- ✅ cssClasses: The CSS classes to override.
799799
- ✅ transformItems: function receiving the items, called before displaying them.
800800

801-
### RatingMenu
801+
### RatingMenu
802802

803803
[Rating menu references](https://www.algolia.com/doc/api-reference/widgets/rating-menu/js/)
804804

805805
The `RatingMenu` widget lets the user refine search results by clicking on stars. The stars are based on the selected attribute.
806806

807-
No compatibility because Meilisearch does not support integers as facet and instantSearch uses facets information to showcase the UI elements.
807+
- ✅ container: The CSS Selector or HTMLElement to insert the widget into. _required_
808+
- ✅ attribute: The name of the attribute in the document. _required_.
809+
- ✅ max: The maximum value for the rating. This value is exclusive, which means the number of stars will be the provided value, minus one.
810+
- ✅ templates: The templates to use for the widget.
811+
- ✅ cssClasses: The CSS classes to override.
812+
813+
Contrary to `instantsearch.js`, To be able to use `RatingMenu` the field containing the rating has to be added in the [`filterableAttributes`](https://docs.meilisearch.com/reference/api/filterable_attributes.html#update-filterable-attributes) setting in your index settings.
808814

809815
### ✅ ClearRefinements
810816

0 commit comments

Comments
 (0)