Added a data prop to be set when modal is open, in order to disable key bindings

This commit is contained in:
Alicia Sykes
2021-05-16 19:40:43 +01:00
parent 0e9aef3f30
commit e05a04243d
8 changed files with 117 additions and 31 deletions

View File

@@ -5,11 +5,13 @@
@user-is-searchin="searching"
@change-display-layout="setLayoutOrientation"
@change-icon-size="setItemSize"
@change-modal-visibility="updateModalVisibility"
:displayLayout="layout"
:iconSize="itemSizeBound"
:availableThemes="getExternalCSSLinks()"
:appConfig="appConfig"
:sections="getSections(sections)"
:modalOpen="modalOpen"
class="filter-container"
/>
<!-- Main content, section for each group of items -->
@@ -54,6 +56,7 @@ export default {
searchValue: '',
layout: '',
itemSizeBound: '',
modalOpen: false, // When true, keybindings are disabled
}),
computed: {
layoutOrientation: {
@@ -126,6 +129,10 @@ export default {
setItemSize(itemSize) {
this.iconSize = itemSize;
},
/* Update data when modal is open (so that key bindings can be disabled) */
updateModalVisibility(modalState) {
this.modalOpen = modalState;
},
/* Returns an array of links to external CSS from the Config */
getExternalCSSLinks() {
const availibleThemes = {};