Update readme

This commit is contained in:
Josh Johnson 2016-07-30 16:17:28 +01:00
parent c0249ffc13
commit 44de7349ab

View file

@ -279,22 +279,6 @@ classNames: {
<strong>Usage:</strong> Classes added to HTML generated by Choices. By default classnames follow the [BEM](http://csswizardry.com/2013/01/mindbemding-getting-your-head-round-bem-syntax/) notation.
### sortFunction
<strong>Type:</strong> `Function` <strong>Default:</strong>
```js
(a, b) => {
const labelA = (a.label || a.value).toLowerCase();
const labelB = (b.label || b.value).toLowerCase();
if (labelA < labelB) return -1;
if (labelA > labelB) return 1;
return 0;
}
```
<strong>Input types affected:</strong> `select-one`, `select-multiple`
<strong>Usage:</strong> Function to sort options and groups. By default options and groups are sorted alphabetically.
### callbackOnInit
<strong>Type:</strong> `Function` <strong>Default:</strong>`() => {}`