Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8388-fineTunningInvoiceIn
gitea/salix-front/pipeline/pr-dev This commit is unstable Details

This commit is contained in:
Jorge Penadés 2025-04-28 16:57:27 +02:00
commit bf79797024
1 changed files with 4 additions and 3 deletions

View File

@ -218,7 +218,7 @@ onBeforeMount(() => {
});
onMounted(async () => {
if ($props.isEditable) document.addEventListener('click', clickHandler);
if ($props.isEditable) document.addEventListener('mousedown', mousedownHandler);
mode.value =
quasar.platform.is.mobile && !$props.disableOption?.card
? CARD_MODE
@ -241,7 +241,7 @@ onMounted(async () => {
});
onUnmounted(async () => {
if ($props.isEditable) document.removeEventListener('click', clickHandler);
if ($props.isEditable) document.removeEventListener('mousedown', mousedownHandler);
});
watch(
@ -389,7 +389,7 @@ function hasEditableFormat(column) {
if (isEditableColumn(column)) return 'editable-text';
}
const clickHandler = async (event) => {
const mousedownHandler = async (event) => {
const clickedElement = event.target.closest('td');
const isDateElement = event.target.closest('.q-date');
const isTimeElement = event.target.closest('.q-time');
@ -412,6 +412,7 @@ const clickHandler = async (event) => {
}
if (isEditableColumn(column)) {
event.preventDefault();
await renderInput(Number(rowIndex), colField, clickedElement);
}
};