Skip to content

Commit

Permalink
docs: added focus based on #166
Browse files Browse the repository at this point in the history
  • Loading branch information
adamberecz committed Dec 16, 2021
1 parent abb86d6 commit 2bfd793
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,15 +255,16 @@ Join our [Discord channel](https://discord.gg/WhX2nG6GTQ) or [open an issue](htt

| Name | Params | Description |
| --- | --- | --- |
| **open** | | Opens the options list and focuses the multiselect. |
| **close** | | Closes the options list and blurs the multiselect. |
| **open** | | Opens the options list. |
| **close** | | Closes the options list. |
| **select** | `option` | Selects an option based on its value. |
| **deselect** | `option` | Deselects an option based on its value. |
| **remove** | `option` | Alias for `deselect`. |
| **selectAll** | | Selects all options if mode is `tags` or `multiple`. |
| **clear** | | Deselects all selected options. |
| **clearSearch** | | Clears current search query. |
| **refreshOptions** | `callback` | Refreshes async options list. |
| **setPointer** | `option` | Points an option based on its value. |


To access API use `ref` on `Multiselect` component:
Expand All @@ -282,6 +283,14 @@ mounted() {
}
```

To programmatically open and focus the multiselect, call `focus()` on the element:

```js
mounted() {
this.$refs.multiselect.$el.focus()
}
```


## Events

Expand Down

0 comments on commit 2bfd793

Please sign in to comment.