@avakhula/ui 0.0.287 → 0.0.288
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.
- package/dist/index.js +836 -829
- package/dist/index.umd.cjs +33 -33
- package/package.json +1 -1
- package/src/components/TreeSelect/Select.vue +10 -2
package/package.json
CHANGED
|
@@ -267,6 +267,10 @@ import IbIconButton from "../IconButton/IconButton.vue";
|
|
|
267
267
|
import IbAlert from "../Alert/Alert.vue";
|
|
268
268
|
import List from "../List.vue";
|
|
269
269
|
|
|
270
|
+
function copy(data) {
|
|
271
|
+
return JSON.parse(JSON.stringify(data));
|
|
272
|
+
}
|
|
273
|
+
|
|
270
274
|
export default {
|
|
271
275
|
name: "IbTreeSelect",
|
|
272
276
|
inject: ["LANG_COMPONENTS"],
|
|
@@ -455,9 +459,12 @@ export default {
|
|
|
455
459
|
}
|
|
456
460
|
},
|
|
457
461
|
options(newOptions) {
|
|
462
|
+
this.initialOptions = copy(newOptions);
|
|
463
|
+
},
|
|
464
|
+
initialOptions(newOptions) {
|
|
458
465
|
let isOptionsEqual = true;
|
|
459
466
|
|
|
460
|
-
if (typeof this.
|
|
467
|
+
if (typeof this.initialOptions === "function") {
|
|
461
468
|
isOptionsEqual = false;
|
|
462
469
|
} else {
|
|
463
470
|
const result = [];
|
|
@@ -516,6 +523,7 @@ export default {
|
|
|
516
523
|
};
|
|
517
524
|
|
|
518
525
|
return {
|
|
526
|
+
initialOptions: copy(this.options),
|
|
519
527
|
val: this.modelValue ? this.modelValue : this.value,
|
|
520
528
|
size: {
|
|
521
529
|
left: (this.initialSize && this.initialSize.left) || 0,
|
|
@@ -658,7 +666,7 @@ export default {
|
|
|
658
666
|
this.defaultFilter(options);
|
|
659
667
|
},
|
|
660
668
|
setPreparedValues(opt) {
|
|
661
|
-
let options = opt || this.
|
|
669
|
+
let options = opt || this.initialOptions;
|
|
662
670
|
if (this.alphabetSort) {
|
|
663
671
|
options = options.sort((a, b) =>
|
|
664
672
|
a.title.toLowerCase().localeCompare(b.title.toLowerCase())
|