Mixin performance #875

Open
jsegarra wants to merge 11 commits from performance_mixins into dev
3 changed files with 2 additions and 16 deletions
Showing only changes of commit 4dc2be291f - Show all commits

View File

@ -25,8 +25,6 @@ export default {
const handleKeyUp = (event) => {
const { ctrlKey, altKey } = event;
// Resetea la bandera cuando se sueltan las teclas ctrl o alt
if (!ctrlKey || !altKey) {
isNotified = false;
}

View File

@ -9,38 +9,25 @@ export default {
const form = document.querySelector('.q-form#formModel');
if (!form) return;
try {
// Login
const inputsFormCard = form.querySelectorAll(
`input:not([disabled]):not([type="checkbox"])`
);
if (inputsFormCard.length) {
// .focus();
// observerInstance.disconnect();
// return;
focusFirstInput(inputsFormCard[0]);
}
// VnNotes
const textareas = document.querySelectorAll(
'textarea:not([disabled]), [contenteditable]:not([disabled])'
);
if (textareas.length) {
// textareas[textareas.length - 1].focus();
// observerInstance.disconnect();
// return;
focusFirstInput(textareas[textareas.length - 1]);
}
// if (!inputs || inputs.length === 0) return;
const inputs = document.querySelectorAll(
'form#formModel input:not([disabled]):not([type="checkbox"])'
);
const input = inputs[0];
if (!input) return;
// if (input.type === 'textarea' || input.form) {
// AUTOFOCUS
focusFirstInput(input);
// input.focus();
// observerInstance.disconnect();
} catch (error) {
console.error(error);
}
@ -61,5 +48,5 @@ export default {
that.onSubmit();
}
});
}, // mounted
},
};

View File

@ -44,6 +44,7 @@ onMounted(async () => {
<template>
<FetchData
url="Countries"
:filter="countriesFilter"
auto-load
@on-fetch="(data) => (countriesOptions = data)"
/>