From d1f48a036265c09e2bb13f8cbd5012f28c5d64ba Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 23 Dec 2021 15:43:12 +0100 Subject: [PATCH] Update PropertySelect docs --- src/style_manager/model/PropertySelect.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/style_manager/model/PropertySelect.js b/src/style_manager/model/PropertySelect.js index 8be5d9442..364377452 100644 --- a/src/style_manager/model/PropertySelect.js +++ b/src/style_manager/model/PropertySelect.js @@ -1,10 +1,14 @@ import Property from './Property'; +/** + * @typedef PropertySelect + * @property {Array} options Array of option definitions, eg `[{ id: '100', label: 'Set 100' }]` + */ export default class PropertySelect extends Property { defaults() { return { ...Property.getDefaults(), - options: [], // Array of options, eg. [{ id: '100', label: 'Set 100' }] + options: [], full: 0, }; } @@ -20,7 +24,8 @@ export default class PropertySelect extends Property { } /** - * Get current selected option. + * Get current selected option or by id. + * @param {String} id Option id. * @returns {Object | null} */ getOption(id) { @@ -30,7 +35,7 @@ export default class PropertySelect extends Property { /** * Update options. - * @param {Array} value Array of options, eg. `[{ id: 'val-1', label: 'Value 1' }]` + * @param {Array} value New array of options, eg. `[{ id: 'val-1', label: 'Value 1' }]` */ setOptions(value = []) { this.set('options', value);