Skip to content

Commit f50d71e

Browse files
committed
Reverting the lookup component changes.
1 parent 8845bae commit f50d71e

File tree

1 file changed

+8
-26
lines changed
  • packages/Webkul/Admin/src/Resources/views/components/attributes/edit

1 file changed

+8
-26
lines changed

packages/Webkul/Admin/src/Resources/views/components/attributes/edit/lookup.blade.php

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -139,43 +139,25 @@ class="px-4 py-2 text-center text-gray-500"
139139
};
140140
},
141141
142-
mounted() {
143-
this.initializeValue();
144-
145-
window.addEventListener('click', this.handleFocusOut);
146-
},
147-
148142
watch: {
149-
value: {
150-
deep: true,
151-
152-
handler() {
153-
this.initializeValue();
154-
},
155-
},
156-
157143
searchTerm(newVal, oldVal) {
158144
this.search();
159145
},
160146
},
161147
148+
mounted() {
149+
if (this.value) {
150+
this.getLookUpEntity();
151+
}
152+
153+
window.addEventListener('click', this.handleFocusOut);
154+
},
155+
162156
beforeDestroy() {
163157
window.removeEventListener('click', this.handleFocusOut);
164158
},
165159
166160
methods: {
167-
initializeValue() {
168-
if (this.value) {
169-
if (this.value.id && this.value.name) {
170-
this.entityId = this.value.id;
171-
172-
this.selectedItem = this.value.name;
173-
} else if (this.value.id) {
174-
this.getLookUpEntity(this.value.id);
175-
}
176-
}
177-
},
178-
179161
toggle() {
180162
this.showPopup = ! this.showPopup;
181163

0 commit comments

Comments
 (0)