Disable searching when item iframe is open

This commit is contained in:
Alicia Sykes 2021-05-29 22:57:48 +01:00
parent fcb260271b
commit 9a573d8ac7
2 changed files with 10 additions and 1 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<modal :name="name" :resizable="true" width="80%" height="80%" @closed="$emit('closed')"> <modal :name="name" :resizable="true" width="80%" height="80%" @closed="modalClosed()">
<div slot="top-right" @click="hide()">Close</div> <div slot="top-right" @click="hide()">Close</div>
<a @click="hide()" class="close-button" title="Close">x</a> <a @click="hide()" class="close-button" title="Close">x</a>
<iframe v-if="url" :src="url" @keydown.esc="close" class="frame"/> <iframe v-if="url" :src="url" @keydown.esc="close" class="frame"/>
@ -20,10 +20,14 @@ export default {
show: function show(url) { show: function show(url) {
this.url = url; this.url = url;
this.$modal.show(this.name); this.$modal.show(this.name);
this.$emit('modalChanged', true);
}, },
hide: function hide() { hide: function hide() {
this.$modal.hide(this.name); this.$modal.hide(this.name);
}, },
modalClosed() {
this.$emit('modalChanged', false);
},
}, },
}; };
</script> </script>

View File

@ -33,6 +33,7 @@
:ref="`iframeModal-${groupId}`" :ref="`iframeModal-${groupId}`"
:name="`iframeModal-${groupId}`" :name="`iframeModal-${groupId}`"
@closed="$emit('itemClicked')" @closed="$emit('itemClicked')"
@modalChanged="modalChanged"
/> />
</Collapsable> </Collapsable>
</template> </template>
@ -50,6 +51,7 @@ export default {
displayData: Object, displayData: Object,
items: Array, items: Array,
itemSize: String, itemSize: String,
modalOpen: Boolean,
}, },
components: { components: {
Collapsable, Collapsable,
@ -70,6 +72,9 @@ export default {
triggerModal(url) { triggerModal(url) {
this.$refs[`iframeModal-${this.groupId}`].show(url); this.$refs[`iframeModal-${this.groupId}`].show(url);
}, },
modalChanged(changedTo) {
this.$emit('change-modal-visibility', changedTo);
},
}, },
}; };
</script> </script>