mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-18 13:45:12 +02:00
Update documentation
This commit is contained in:
parent
377c61fb0c
commit
f2b58807be
14
README.md
14
README.md
|
@ -378,7 +378,7 @@ classNames: {
|
|||
**Usage:** Function to run once Choices initialises.
|
||||
|
||||
### callbackOnAddItem
|
||||
**Type:** `Function` **Default:** `null` **Arguments:** `id, value, passedInput`
|
||||
**Type:** `Function` **Default:** `null` **Arguments:** `id, value, groupValue`
|
||||
|
||||
**Input types affected:** `text`, `select-one`, `select-multiple`
|
||||
|
||||
|
@ -388,28 +388,28 @@ classNames: {
|
|||
|
||||
```js
|
||||
const example = new Choices(element, {
|
||||
callbackOnAddItem: (id, value, passedInput) => {
|
||||
callbackOnAddItem: (id, value, groupValue) => {
|
||||
// do something creative here...
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
### callbackOnRemoveItem
|
||||
**Type:** `Function` **Default:** `null` **Arguments:** `id, value, passedInput`
|
||||
**Type:** `Function` **Default:** `null` **Arguments:** `id, value, groupValue`
|
||||
|
||||
**Input types affected:** `text`, `select-one`, `select-multiple`
|
||||
|
||||
**Usage:** Function to run each time an item is removed (programmatically or by the user).
|
||||
|
||||
### callbackOnHighlightItem
|
||||
**Type:** `Function` **Default:** `null` **Arguments:** `id, value, passedInput`
|
||||
**Type:** `Function` **Default:** `null` **Arguments:** `id, value, groupValue`
|
||||
|
||||
**Input types affected:** `text`, `select-multiple`
|
||||
|
||||
**Usage:** Function to run each time an item is highlighted.
|
||||
|
||||
### callbackOnUnhighlightItem
|
||||
**Type:** `Function` **Default:** `null` **Arguments:** `id, value, passedInput`
|
||||
**Type:** `Function` **Default:** `null` **Arguments:** `id, value, groupValue`
|
||||
|
||||
**Input types affected:** `text`, `select-multiple`
|
||||
|
||||
|
@ -449,14 +449,14 @@ const example = new Choices(element, {
|
|||
```
|
||||
|
||||
### callbackOnChange
|
||||
**Type:** `Function` **Default:** `null` **Arguments:** `value, passedInput`
|
||||
**Type:** `Function` **Default:** `null` **Arguments:** `value`
|
||||
|
||||
**Input types affected:** `text`, `select-one`, `select-multiple`
|
||||
|
||||
**Usage:** Function to run each time an item is added/removed by a user.
|
||||
|
||||
### callbackOnSearch
|
||||
**Type:** `Function` **Default:** `null` **Arguments:** `value, passedInput`
|
||||
**Type:** `Function` **Default:** `null` **Arguments:** `value`
|
||||
|
||||
**Input types affected:** `select-one`, `select-multiple`
|
||||
|
||||
|
|
Loading…
Reference in a new issue