@avakhula/ui 0.0.192 → 0.0.193
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/package.json
CHANGED
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
:is-multiple="isMultiple"
|
|
94
94
|
:is-bookmarkable="true"
|
|
95
95
|
:is-bookmarked="true"
|
|
96
|
-
@check="
|
|
96
|
+
@check="onCheck"
|
|
97
97
|
@toggle-bookmark="toggleBookmark"
|
|
98
98
|
:uid="uid"
|
|
99
99
|
:only-end-nodes="onlyEndNodes"
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
:name="actualName"
|
|
152
152
|
:parent-auto-check="parentAutoCheck"
|
|
153
153
|
:is-multiple="isMultiple"
|
|
154
|
-
@check="
|
|
154
|
+
@check="onCheck"
|
|
155
155
|
@toggle-bookmark="toggleBookmark"
|
|
156
156
|
:uid="uid"
|
|
157
157
|
:only-end-nodes="onlyEndNodes"
|
|
@@ -214,7 +214,7 @@
|
|
|
214
214
|
:parent-auto-check="parentAutoCheck"
|
|
215
215
|
:is-multiple="isMultiple"
|
|
216
216
|
:is-bookmarkable="isBookmarkable"
|
|
217
|
-
@check="
|
|
217
|
+
@check="onCheck"
|
|
218
218
|
@toggle-bookmark="toggleBookmark"
|
|
219
219
|
:uid="uid"
|
|
220
220
|
:only-end-nodes="onlyEndNodes"
|
|
@@ -765,6 +765,11 @@ export default {
|
|
|
765
765
|
checkIfOptionsChecked(options) {
|
|
766
766
|
return options.every((option) => option.checked);
|
|
767
767
|
},
|
|
768
|
+
onCheck(option, isChecked, isDirectChild) {
|
|
769
|
+
this.registerCheck(option, isChecked, isDirectChild);
|
|
770
|
+
this.$emit("update:modelValue", Object.keys(this.selected));
|
|
771
|
+
this.$emit("input", Object.keys(this.selected));
|
|
772
|
+
},
|
|
768
773
|
registerCheck(option, isChecked, isDirectChild) {
|
|
769
774
|
if (isChecked) {
|
|
770
775
|
option.checked = true;
|
|
@@ -773,8 +778,6 @@ export default {
|
|
|
773
778
|
!(this.onlyEndNodes && option.children && option.children.length)
|
|
774
779
|
) {
|
|
775
780
|
this.selected[option.id] = option;
|
|
776
|
-
this.$emit("update:modelValue", Object.keys(this.selected));
|
|
777
|
-
this.$emit("input", Object.keys(this.selected));
|
|
778
781
|
}
|
|
779
782
|
} else {
|
|
780
783
|
const selectedOptionKey = Object.keys(this.selected)[0];
|
|
@@ -789,8 +792,6 @@ export default {
|
|
|
789
792
|
} else {
|
|
790
793
|
delete this.selected[option.id];
|
|
791
794
|
option.checked = false;
|
|
792
|
-
this.$emit("update:modelValue", Object.keys(this.selected));
|
|
793
|
-
this.$emit("input", Object.keys(this.selected));
|
|
794
795
|
}
|
|
795
796
|
|
|
796
797
|
this.toggleDuplicateOptions(this.actualOptions, option.id, isChecked);
|
|
@@ -815,6 +816,9 @@ export default {
|
|
|
815
816
|
this.traverseTree(this.actualOptions, (option) => {
|
|
816
817
|
this.registerCheck(option, this.allOptionsIsChecked, false);
|
|
817
818
|
});
|
|
819
|
+
|
|
820
|
+
this.$emit("update:modelValue", Object.keys(this.selected));
|
|
821
|
+
this.$emit("input", Object.keys(this.selected));
|
|
818
822
|
},
|
|
819
823
|
traverseTree(tree, callback) {
|
|
820
824
|
tree.forEach((option) => {
|