From 94f7125fc930cb127cb23efe7aef14b22ddff002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8lve=20Torn=C3=B8e?= Date: Tue, 17 Nov 2020 01:15:05 +0100 Subject: [PATCH] docs: Add selectable prop to api (#1308) --- docs/api/props.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/api/props.md b/docs/api/props.md index 63c8ceb..ac569f3 100644 --- a/docs/api/props.md +++ b/docs/api/props.md @@ -116,6 +116,23 @@ searchable: { }, ``` +## selectable + +The `selectable` prop determines if an option is selectable or not. If `selectable` returns false +for a given option, it will be displayed with a `vs__dropdown-option--disabled` class. The option +will be disabled and unable to be selected. + +```js +selectable: { + type: Function, + /** + * @param {Object|String} option + * @return {boolean} + */ + default: option => true, +}, +``` + ## multiple Equivalent to the `multiple` attribute on a `