Skip to content

Commit e7ac953

Browse files
committed
fix: Set cssClass as optional in documentation
1 parent 59a0bc5 commit e7ac953

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,7 @@ search.addWidget(
145145
{name: 'instant_search_price_asc', label: 'Lowest price'},
146146
{name: 'instant_search_price_desc', label: 'Highest price'}
147147
],
148-
htmlAttributes: {
149-
id: 'indexSelectorDropdown',
150-
class: 'form-control'
151-
}
148+
cssClass: 'form-control'
152149
})
153150
);
154151
```
@@ -158,7 +155,7 @@ search.addWidget(
158155
* Instantiate a dropdown element to choose the current targeted index
159156
* @param {String|DOMElement} options.container Valid CSS Selector as a string or DOMElement
160157
* @param {Array} options.indices Array of objects defining the different indices to choose from. Each object must contain a `name` and `label` key.
161-
* @param {String} [options.htmlAttributes] Object of html attributes to be passed to the generated `select` element
158+
* @param {String} [options.cssClass] Class name(s) to be added to the generated select element
162159
* @return {Object}
163160
*/
164161
```

widgets/index-selector.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var utils = require('../lib/widget-utils.js');
77
* Instantiate a dropdown element to choose the current targeted index
88
* @param {String|DOMElement} options.container Valid CSS Selector as a string or DOMElement
99
* @param {Array} options.indices Array of objects defining the different indices to choose from. Each object must contain a `name` and `label` key.
10-
* @param {String} options.cssClass Class name(s) to be added to the generated select element
10+
* @param {String} [options.cssClass] Class name(s) to be added to the generated select element
1111
* @return {Object}
1212
*/
1313
function indexSelector({
@@ -18,7 +18,7 @@ function indexSelector({
1818
var IndexSelector = require('../components/IndexSelector');
1919
var containerNode = utils.getContainerNode(container);
2020

21-
var usage = 'Usage: indexSelector({container, indices[, htmlAttributes]})';
21+
var usage = 'Usage: indexSelector({container, indices[, cssClass]})';
2222
if (container === null || indices === null) {
2323
throw new Error(usage);
2424
}

0 commit comments

Comments
 (0)