fix: ctrl+a on results doesn't work properly

This commit is contained in:
Fabio Di Stasio 2022-06-28 17:55:18 +02:00
parent 822af44a47
commit 5f57a9f60d
2 changed files with 6 additions and 3 deletions

View File

@ -66,7 +66,7 @@ const props = defineProps({
const emit = defineEmits(['confirm', 'hide']);
const slots = useSlots();
const { trapRef } = useFocusTrap();
const { trapRef } = useFocusTrap({ disableAutofocus: true });
const hasHeader = computed(() => !!slots.header);
const hasBody = computed(() => !!slots.body);

View File

@ -339,6 +339,8 @@ const closeContext = () => {
const showDeleteConfirmModal = (e: any) => {
if (e && e.path && ['INPUT', 'TEXTAREA', 'SELECT'].includes(e.path[0].tagName))
return;
if (selectedRows.value.length === 0) return;
isDeleteConfirmModal.value = true;
};
@ -453,11 +455,12 @@ const selectAllRows = (e: KeyboardEvent) => {
}, []);
};
const deselectRows = () => {
const deselectRows = (e: Event) => {
if (!isEditingRow.value) {
selectedRows.value = [];
selectedField.value = null;
hasFocus.value = false;
if (e.type === 'blur')
hasFocus.value = false;
}
};