mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-01 05:22:21 +02:00
Update readme
This commit is contained in:
parent
c0249ffc13
commit
44de7349ab
16
README.md
16
README.md
|
@ -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.
|
<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
|
### callbackOnInit
|
||||||
<strong>Type:</strong> `Function` <strong>Default:</strong>`() => {}`
|
<strong>Type:</strong> `Function` <strong>Default:</strong>`() => {}`
|
||||||
|
|
Loading…
Reference in a new issue