diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue index c850f2e53..339f90e0e 100644 --- a/src/components/common/VnSelect.vue +++ b/src/components/common/VnSelect.vue @@ -171,7 +171,8 @@ onMounted(() => { }); const arrayDataKey = - $props.dataKey ?? ($props.url?.length > 0 ? $props.url : $attrs.name ?? $attrs.label); + $props.dataKey ?? + ($props.url?.length > 0 ? $props.url : ($attrs.name ?? $attrs.label)); const arrayData = useArrayData(arrayDataKey, { url: $props.url, @@ -220,7 +221,7 @@ async function fetchFilter(val) { optionFilterValue.value ?? (new RegExp(/\d/g).test(val) ? optionValue.value - : optionFilter.value ?? optionLabel.value); + : (optionFilter.value ?? optionLabel.value)); let defaultWhere = {}; if ($props.filterOptions.length) { @@ -239,7 +240,7 @@ async function fetchFilter(val) { const { data } = await arrayData.applyFilter( { filter: filterOptions }, - { updateRouter: false } + { updateRouter: false }, ); setOptions(data); return data; @@ -272,7 +273,7 @@ async function filterHandler(val, update) { ref.setOptionIndex(-1); ref.moveOptionSelection(1, true); } - } + }, ); } @@ -308,7 +309,7 @@ function handleKeyDown(event) { if (inputValue) { const matchingOption = myOptions.value.find( (option) => - option[optionLabel.value].toLowerCase() === inputValue.toLowerCase() + option[optionLabel.value].toLowerCase() === inputValue.toLowerCase(), ); if (matchingOption) { @@ -320,11 +321,11 @@ function handleKeyDown(event) { } const focusableElements = document.querySelectorAll( - 'a:not([disabled]), button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), details:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled])' + 'a:not([disabled]), button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), details:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled])', ); const currentIndex = Array.prototype.indexOf.call( focusableElements, - event.target + event.target, ); if (currentIndex >= 0 && currentIndex < focusableElements.length - 1) { focusableElements[currentIndex + 1].focus(); diff --git a/src/components/common/VnSelectSupplier.vue b/src/components/common/VnSelectSupplier.vue index f86db4f2d..5a821456e 100644 --- a/src/components/common/VnSelectSupplier.vue +++ b/src/components/common/VnSelectSupplier.vue @@ -1,9 +1,7 @@