Skip to content

Commit 9ff701b

Browse files
committed
Resolved issue: Overlay Issue in Name and Organization Fields on Person View Page #1916
1 parent 2761be1 commit 9ff701b

File tree

1 file changed

+16
-2
lines changed
  • packages/Webkul/Admin/src/Resources/views/components/form/control-group/controls/inline

1 file changed

+16
-2
lines changed

packages/Webkul/Admin/src/Resources/views/components/form/control-group/controls/inline/lookup.blade.php

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@ class="item-center flex justify-center bg-red-100 p-1 hover:bg-red-200 ltr:round
235235
dropdownPosition: "bottom",
236236
237237
isRTL: document.documentElement.dir === 'rtl',
238+
239+
uniqueId: Math.floor(100000 + Math.random() * 900000),
238240
};
239241
},
240242
@@ -255,6 +257,16 @@ class="item-center flex justify-center bg-red-100 p-1 hover:bg-red-200 ltr:round
255257
256258
mounted() {
257259
window.addEventListener("resize", this.setDropdownPosition);
260+
261+
this.$emitter.on('lookup-dropdown-opened', (data) => {
262+
if (data.componentId !== this.uniqueId) {
263+
this.showPopup = false;
264+
}
265+
});
266+
},
267+
268+
beforeUnmount() {
269+
this.$emitter.off('lookup-dropdown-opened');
258270
},
259271
260272
computed: {
@@ -295,6 +307,8 @@ class="item-center flex justify-center bg-red-100 p-1 hover:bg-red-200 ltr:round
295307
},
296308
297309
toggleEditor() {
310+
this.$emitter.emit('lookup-dropdown-opened', { componentId: this.uniqueId });
311+
298312
this.showPopup = ! this.showPopup;
299313
300314
if (this.showPopup) {
@@ -331,7 +345,7 @@ class="item-center flex justify-center bg-red-100 p-1 hover:bg-red-200 ltr:round
331345
})
332346
.catch((error) => {
333347
this.isDirty = false;
334-
348+
335349
this.inputValue = this.value;
336350
337351
this.$emitter.emit('add-flash', { type: 'error', message: error.response.data.message });
@@ -437,4 +451,4 @@ class="item-center flex justify-center bg-red-100 p-1 hover:bg-red-200 ltr:round
437451
},
438452
});
439453
</script>
440-
@endPushOnce
454+
@endPushOnce

0 commit comments

Comments
 (0)