Skip to content

Commit 626d5f1

Browse files
author
Alexandre Stanislawski
committed
feat(connector): jsDoc for connectMenu
1 parent fdf59d7 commit 626d5f1

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

src/connectors/menu/connectMenu.js

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,12 @@ Full documentation available at https://community.algolia.com/instantsearch.js/c
3232

3333
/**
3434
* @typedef {Object} MenuRenderingOptions
35-
* @property {Object[]} items
36-
* @property {Object} state
37-
* @property {function} createURL
38-
* @property {function} refine
39-
* @property {AlgoliaSearchHelper} helper
40-
* @property {InstantSearch} instantSearchInstance
41-
* @property {boolean} canRefine
35+
* @property {Object[]} items the elements that can be refined for the current search results
36+
* @property {function} createURL creates the URL for a single item name in the list
37+
* @property {function} refine filter the search to item.name value
38+
* @property {boolean} canRefine true if refinement can be applied
4239
* @property {Object} widgetParams all original options forwarded to rendering
40+
* @property {InstantSearch} instantSearchInstance the instance of instantsearch on which the widget is attached
4341
*/
4442

4543
/**
@@ -88,25 +86,21 @@ export default function connectMenu(renderFn) {
8886

8987
renderFn({
9088
items: [],
91-
state: helper.state,
9289
createURL: this._createURL,
9390
refine: this._refine,
94-
helper: this._helper,
9591
instantSearchInstance,
9692
canRefine: false,
9793
widgetParams,
9894
}, true);
9995
},
10096

101-
render({results, state, instantSearchInstance}) {
97+
render({results, instantSearchInstance}) {
10298
const items = results.getFacetValues(attributeName, {sortBy}).data || [];
10399

104100
renderFn({
105101
items,
106-
state,
107102
createURL: this._createURL,
108103
refine: this._refine,
109-
helper: this._helper,
110104
instantSearchInstance,
111105
canRefine: items.length > 0,
112106
widgetParams,

0 commit comments

Comments
 (0)