Skip to content

Commit

Permalink
fix: Set cssClass as optional in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelastic committed Sep 8, 2015
1 parent 59a0bc5 commit e7ac953
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,7 @@ search.addWidget(
{name: 'instant_search_price_asc', label: 'Lowest price'},
{name: 'instant_search_price_desc', label: 'Highest price'}
],
htmlAttributes: {
id: 'indexSelectorDropdown',
class: 'form-control'
}
cssClass: 'form-control'
})
);
```
Expand All @@ -158,7 +155,7 @@ search.addWidget(
* Instantiate a dropdown element to choose the current targeted index
* @param {String|DOMElement} options.container Valid CSS Selector as a string or DOMElement
* @param {Array} options.indices Array of objects defining the different indices to choose from. Each object must contain a `name` and `label` key.
* @param {String} [options.htmlAttributes] Object of html attributes to be passed to the generated `select` element
* @param {String} [options.cssClass] Class name(s) to be added to the generated select element
* @return {Object}
*/
```
Expand Down
4 changes: 2 additions & 2 deletions widgets/index-selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var utils = require('../lib/widget-utils.js');
* Instantiate a dropdown element to choose the current targeted index
* @param {String|DOMElement} options.container Valid CSS Selector as a string or DOMElement
* @param {Array} options.indices Array of objects defining the different indices to choose from. Each object must contain a `name` and `label` key.
* @param {String} options.cssClass Class name(s) to be added to the generated select element
* @param {String} [options.cssClass] Class name(s) to be added to the generated select element
* @return {Object}
*/
function indexSelector({
Expand All @@ -18,7 +18,7 @@ function indexSelector({
var IndexSelector = require('../components/IndexSelector');
var containerNode = utils.getContainerNode(container);

var usage = 'Usage: indexSelector({container, indices[, htmlAttributes]})';
var usage = 'Usage: indexSelector({container, indices[, cssClass]})';
if (container === null || indices === null) {
throw new Error(usage);
}
Expand Down

0 comments on commit e7ac953

Please sign in to comment.