From 582a0f0facd3c75d5366d5f736c530996c5241dd Mon Sep 17 00:00:00 2001 From: Jeff Sagal Date: Mon, 2 Dec 2019 13:21:02 -0800 Subject: [PATCH] docs(resetOnOptionsChange): update documentation (#1019) Related #1015 --- docs/api/props.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/api/props.md b/docs/api/props.md index 80fefce..5050c76 100644 --- a/docs/api/props.md +++ b/docs/api/props.md @@ -339,12 +339,20 @@ createOption: { ## resetOnOptionsChange -When false, updating the options will not reset the select value +When false, updating the options will not reset the selected value. Accepts +a `boolean` or `function` that returns a `boolean`. If defined as a function, +it will receive the params listed below. ```js +/** +* @type {Boolean|Function} +* @param {Array} newOptions +* @param {Array} oldOptions +* @param {Array} selectedValue +*/ resetOnOptionsChange: { - type: Boolean, - default: false + default: false, + validator: (value) => ['function', 'boolean'].includes(typeof value) }, ```