Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into fix_vnMultiCheck
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
This commit is contained in:
commit
75d0c57203
|
@ -214,7 +214,7 @@ onBeforeMount(() => {
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
if ($props.isEditable) document.addEventListener('click', clickHandler);
|
if ($props.isEditable) document.addEventListener('mousedown', mousedownHandler);
|
||||||
mode.value =
|
mode.value =
|
||||||
quasar.platform.is.mobile && !$props.disableOption?.card
|
quasar.platform.is.mobile && !$props.disableOption?.card
|
||||||
? CARD_MODE
|
? CARD_MODE
|
||||||
|
@ -237,7 +237,7 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(async () => {
|
onUnmounted(async () => {
|
||||||
if ($props.isEditable) document.removeEventListener('click', clickHandler);
|
if ($props.isEditable) document.removeEventListener('mousedown', mousedownHandler);
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
|
@ -385,7 +385,7 @@ function hasEditableFormat(column) {
|
||||||
if (isEditableColumn(column)) return 'editable-text';
|
if (isEditableColumn(column)) return 'editable-text';
|
||||||
}
|
}
|
||||||
|
|
||||||
const clickHandler = async (event) => {
|
const mousedownHandler = async (event) => {
|
||||||
const clickedElement = event.target.closest('td');
|
const clickedElement = event.target.closest('td');
|
||||||
const isDateElement = event.target.closest('.q-date');
|
const isDateElement = event.target.closest('.q-date');
|
||||||
const isTimeElement = event.target.closest('.q-time');
|
const isTimeElement = event.target.closest('.q-time');
|
||||||
|
@ -408,6 +408,7 @@ const clickHandler = async (event) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isEditableColumn(column)) {
|
if (isEditableColumn(column)) {
|
||||||
|
event.preventDefault();
|
||||||
await renderInput(Number(rowIndex), colField, clickedElement);
|
await renderInput(Number(rowIndex), colField, clickedElement);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue