diff --git a/documentation/v2/index.html b/documentation/v2/index.html index da1094e8..d79ad28d 100644 --- a/documentation/v2/index.html +++ b/documentation/v2/index.html @@ -665,7 +665,7 @@ <pre>Multiselect Open: {{ isOpen }}</pre> <label class="typo__label">Controlling multiselect programmatically</label> <multiselect ref="multiselect" placeholder="Pick at least one" :value="value" :options="options" :multiple="true" :searchable="true" :allow-empty="false" :hide-selected="true" :max-height="150" :max="3" @open="isOpen = true" @close="isOpen = false"></multiselect> -</div>
| Name | Type | Default | Description |
|---|---|---|---|
| multiselectMixin.js | |||
| id | Integer||String | Used to identify the component in events. | |
| options | Array | Array of available options: Objects, Strings or Integers. If array of objects, visible label will default to option.label. | |
| value | Object||Array||String||Integer | Presets the selected options. | |
| multiple | Boolean | false | Equivalent to the multiple attribute on a <select> input. |
| trackBy | String | Used to compare objects. Only use if options are objects. | |
| label | String | Label from option Object, that will be visible in the dropdown. | |
| searchable | Boolean | true | Add / removes search input. |
| clearOnSelect | Boolean | true | Clear the search input after select(). Use only when multiple is true. |
| hideSelected | Boolean | false | Hide already selected options |
| placeholder | String | 'Select option' | Equivalent to the placeholder attribute on a <select> input. |
| allowEmpty | Boolean | true | Allows to remove all selected values. Otherwise one must be left selected. |
| resetAfter | Boolean | false | Reset this.value, this.search, this.selected after this.value changes. |
| closeOnSelect | Boolean | true | Enable/disable closing after selecting an option |
| customLabel | Function => String | Function used to create a custom label | |
| taggable | Boolean | false | Disable / Enable tagging |
| tagPlaceholder | String | 'Press enter to create a tag' | String to show when highlighting a potential tag |
| tagPosition | String | 'top' | By default new tags will appear above the search results. Changing to 'bottom' will revert this behaviour and will proritize the search results |
| max | Number | Number of allowed selected options. | |
| optionsLimit | Number | 1000 | Limits the options displayed in the dropdown to the first X options. |
| groupValues | String | Name of the property containing the group values | |
| groupLabel | String | Name of the property containing the group label | |
| groupSelect | Boolean | false | Allow to select all group values by selecting the group label |
| blockKeys | Array | [] | Array of keyboard key aliases to block when selecting |
| internalSearch | Boolean | true | Decide whether to filter the results internally based on search query. Useful for async filtering, where we search through more complex data. |
| preserveSearch | Boolean | false | If set to true, will preserve the search query when opening/closing the component. |
| preselectFirst | Boolean | false | Selects the first option if initial value is empty |
| preventAutofocus | Boolean | false | Disabled the search input focusing when the multiselect opens |
| Multiselect.vue | |||
| name | String | '' | Name attribute to match optional label element |
| selectLabel | String | 'Press enter to select' | String to show when pointing to an option |
| selectGroupLabel | String | 'Press enter to select group' | String to show when pointing to an option |
| selectedLabel | String | 'Selected' | String to show next to selected option |
| deselectLabel | String | 'Press enter to remove' | String to show when pointing to an already selected option |
| deselectGroupLabel | String | 'Press enter to deselect group' | String to show when pointing to an already selected group |
| showLabels | Boolean | true | Decide whether to show labels on highlighted options |
| limit | Number | 99999 | Limit the display of selected options. The rest will be hidden within the limitText string. |
| limitText | Function => String | count => `and ${count} more` | Function that process the message shown when selected elements pass the defined limit. |
| loading | Boolean | false | Show/hide the loading spinner. |
| disabled | Boolean | false | Enable/disable the multiselect. |
| maxHeight | Integer | 300 | Sets max-height style value of the dropdown |
| openDirection | String | '' | Fixed opening direction (instead of auto). Options are "above"/"top" or "below"/"bottom" |
| showNoOptions | Boolean | true | Show the showNoOptions slot if list is empty. |
| showNoResults | Boolean | true | Show the noResult slot if no results are found. |
| tabindex | Number | 0 | Specify the tabindex of the Multiselect component |
| pointerMixin.js | |||
| showPointer | Boolean | true | Enable/disable highlighting of the pointed value. |
| optionHeight | Number | 40 | The height of the option element. Required for proper scrolling. |
| Name | Attributes | Listen to | Description |
|---|---|---|---|
| Input | (value, id) | @input | Emitted after this.value changes |
| Select | (selectedOption, id) | @select | Emitted after selecting an option |
| Remove | (removedOption, id) | @remove | Emitted after removing an option |
| SearchChange | (searchQuery, id) | @search-change | Emitted after the search query changes |
| Tag | (searchQuery, id) | @tag | Emitted after user attempts to add a tag |
| Open | (id) | @open | Emitted when the dropdown opens. Useful for detecting when touched. |
| Close | (value, id) | @close | Emitted when the dropdown closes |
| Name | Description |
|---|---|
| option | Slot for custom option template. See example. Default: Shows option label Slot-scope
|
| maxElements | Shows when the maximum options have been selected. Defaults to string: Default: Maximum of <max> options selected. First remove a selected option to select another. |
| noResult | Shows when no elements match the search query. Defaults to string: Default: No elements found. Consider changing the search query. |
| noOptions | Shows when no elements in options empty. Defaults to string: Default: List is empty. |
| beforeList | Shows before the list, when dropdown is open. |
| afterList | Shows after the list, when dropdown is open. |
| caret | Element for opening and closing the dropdown. Slot-scope
|
| singleLabel | Slot for custom label template for single select |
| placeholder | Slot for the placeholder (is not displayed when the dropdown is open and `searchable` is true) |
| limit | Slot to display when the number of selected options is greater than `optionsLimit`. |
| clear | Slot located before the tags Slot-scope
|
| tag | Slot that is used for each selected option (tags) Slot-scope
|
| selection | Slot that can be used to show all selected tags. The main different between theselectionslot and thetagslot is that thetagslot renders per tag, however this slot renders just once, leaving the display of each tag to you (if you wish to display each one)Slot-scope
|