sprintify-ui 0.0.110 → 0.0.111
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -169,6 +169,7 @@ export interface SelectConfigurationOption {
|
|
|
169
169
|
[key: string]: any;
|
|
170
170
|
}
|
|
171
171
|
export interface SelectConfiguration {
|
|
172
|
+
option?: SelectConfigurationOption;
|
|
172
173
|
options: SelectConfigurationOption[];
|
|
173
|
-
onChange
|
|
174
|
+
onChange?: (option: SelectConfigurationOption | null) => void;
|
|
174
175
|
}
|
package/package.json
CHANGED
|
@@ -425,8 +425,14 @@ const selection = ref(null) as Ref<OptionValue>;
|
|
|
425
425
|
watch(
|
|
426
426
|
() => props.select,
|
|
427
427
|
(select) => {
|
|
428
|
-
if (select
|
|
429
|
-
|
|
428
|
+
if (select) {
|
|
429
|
+
if (select.option) {
|
|
430
|
+
selection.value = select.option.value;
|
|
431
|
+
} else if (select.options.length) {
|
|
432
|
+
selection.value = select.options[0].value;
|
|
433
|
+
}
|
|
434
|
+
} else {
|
|
435
|
+
selection.value = null;
|
|
430
436
|
}
|
|
431
437
|
},
|
|
432
438
|
{ immediate: true }
|
package/src/types/index.ts
CHANGED
|
@@ -205,6 +205,7 @@ export interface SelectConfigurationOption {
|
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
export interface SelectConfiguration {
|
|
208
|
+
option?: SelectConfigurationOption;
|
|
208
209
|
options: SelectConfigurationOption[];
|
|
209
|
-
onChange
|
|
210
|
+
onChange?: (option: SelectConfigurationOption | null) => void;
|
|
210
211
|
}
|