You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/connectors/hierarchical-menu/connectHierarchicalMenu.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ search.addWidget(
17
17
[ rootPath = null ],
18
18
[ showParentLevel = true ],
19
19
[ limit = 10 ],
20
-
[ sortBy = ['isRefined', 'count:desc'] ],
20
+
[ sortBy = ['name:asc'] ],
21
21
})
22
22
);
23
23
Full documentation available at https://community.algolia.com/instantsearch.js/connectors/connectHierarchicalMenu.html
@@ -39,7 +39,7 @@ Full documentation available at https://community.algolia.com/instantsearch.js/c
39
39
* @property {string} [rootPath] Prefix path to use if the first level is not the root level (default: `null`).
40
40
* @property {string} [showParentLevel] Show the parent level of the current refined value (default: `true`).
41
41
* @property {number} [limit] How much facet values to get (default: `10`).
42
-
* @property {string[]|function} [sortBy] How to sort refinements. Possible values: `count|isRefined|name:asc|name:desc`.
42
+
* @property{string[]|function} [sortBy=['name:asc']] How to sort refinements. Possible values: `count|isRefined|name:asc|name:desc`.
43
43
*
44
44
* You can also use a sort function that behaves like the standard Javascript [compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Syntax).
45
45
*
@@ -73,7 +73,7 @@ export default function connectHierarchicalMenu(renderFn) {
Copy file name to clipboardExpand all lines: src/connectors/menu/connectMenu.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ search.addWidget(
18
18
attributeName,
19
19
[ limit ],
20
20
[ showMoreLimit ]
21
-
[ sortBy = ['isRefined', 'count:desc'] ]
21
+
[ sortBy = ['name:asc'] ]
22
22
})
23
23
);
24
24
Full documentation available at https://community.algolia.com/instantsearch.js/connectors/connectMenu.html
@@ -37,7 +37,7 @@ Full documentation available at https://community.algolia.com/instantsearch.js/c
37
37
* @property {string} attributeName Name of the attribute for faceting (eg. "free_shipping").
38
38
* @property {number} [limit] How many facets values to retrieve [*] (default: `10`).
39
39
* @property {number} [showMoreLimit] How many facets values to retrieve when `toggleShowMore` is called, this value is meant to be greater than `limit` option (default: `undefined`).
40
-
* @property {string[]|function} [sortBy] How to sort refinements. Possible values: `count|isRefined|name:asc|name:desc`.
40
+
* @property {string[]|function} [sortBy = ['name:asc']] How to sort refinements. Possible values: `count|isRefined|name:asc|name:desc`.
41
41
*
42
42
* You can also use a sort function that behaves like the standard Javascript [compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Syntax). [*]
43
43
*
@@ -108,7 +108,7 @@ export default function connectMenu(renderFn) {
* @property {string} attributeName The name of the attribute in the records.
47
47
* @property {"and"|"or"} [operator] How the filters are combined together (default: `"or"`).
48
48
* @property {number} [limit] The max number of items to display.
49
+
* @property {string[]|function} [sortBy = ['isRefined', 'count:desc', 'name:asc']] How to sort refinements. Possible values: `count|isRefined|name:asc|name:desc`.
49
50
* @property {string[]|function} [sortBy] How to sort refinements. Possible values: `count|isRefined|name:asc|name:desc` (default: `['isRefined', 'count:desc']`).
50
51
*/
51
52
@@ -119,7 +120,7 @@ export default function connectRefinementList(renderFn) {
Copy file name to clipboardExpand all lines: src/widgets/menu/menu.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ const usage = `Usage:
68
68
menu({
69
69
container,
70
70
attributeName,
71
-
[ sortBy=['count:desc', 'name:asc'] ],
71
+
[ sortBy=['name:asc'] ],
72
72
[ limit=10 ],
73
73
[ cssClasses.{root,list,item} ],
74
74
[ templates.{header,item,footer} ],
@@ -119,7 +119,7 @@ menu({
119
119
* @typedef {Object} MenuWidgetOptions
120
120
* @property {string|DOMElement} container CSS Selector or DOMElement to insert the widget
121
121
* @property {string} attributeName Name of the attribute for faceting
122
-
* @property {string[]|function} [sortBy=['count:desc', 'name:asc']] How to sort refinements. Possible values: `count|isRefined|name:asc|name:desc`.
122
+
* @property {string[]|function} [sortBy=['name:asc']] How to sort refinements. Possible values: `count|isRefined|name:asc|name:desc`.
123
123
* You can also use a sort function that behaves like the standard Javascript [compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Syntax). [*]
124
124
* @property {string} [limit=10] How many facets values to retrieve [*]
125
125
* @property {boolean|MenuShowMoreOptions} [showMore=false] Limit the number of results and display a showMore button
* @property {string|DOMElement} container CSS Selector or DOMElement to insert the widget
162
162
* @property {string} attributeName Name of the attribute for faceting
163
163
* @property {"and"|"or"} [operator="or"] How to apply refinements. Possible values: `or`, `and`
164
-
* @property {("isRefined"|"count:asc"|"count:desc"|"name:asc"|"name:desc")[]|function} [sortBy=["count:desc", "name:asc"]] How to sort refinements. Possible values: `count:asc` `count:desc` `name:asc` `name:desc` `isRefined`.
165
-
* You can lso use a sort function that behaves like the standard Javascript [compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Syntax).
164
+
* @property {string[]|function} [sortBy=["isRefined", "count:desc", "name:asc"]] How to sort refinements. Possible values: `count:asc` `count:desc` `name:asc` `name:desc` `isRefined`.
165
+
* You can also use a sort function that behaves like the standard Javascript [compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Syntax).
166
166
* @property {number} [limit=10] How much facet values to get. When the show more feature is activated this is the minimum number of facets requested (the show more button is not in active state).
167
167
* @property {SearchForFacetOptions|boolean} [searchForFacetValues=false] Add a search input to let the user search for more facet values
168
168
* @property {RefinementListShowMoreOptions|boolean} [showMore=false] Limit the number of results and display a showMore button
@@ -203,7 +203,7 @@ export default function refinementList({
0 commit comments