From 2bfd793d2ca88b275384701516e32db18cb8553b Mon Sep 17 00:00:00 2001 From: Adam Berecz Date: Thu, 16 Dec 2021 16:44:22 +0100 Subject: [PATCH] docs: added focus based on #166 --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ea1b0d7..d3bafe6 100644 --- a/README.md +++ b/README.md @@ -255,8 +255,8 @@ 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`. | @@ -264,6 +264,7 @@ Join our [Discord channel](https://discord.gg/WhX2nG6GTQ) or [open an issue](htt | **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: @@ -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