fix QField cant be clicked in extra community table

This commit is contained in:
William Buezas 2023-12-11 14:47:15 -03:00
parent 71e729c0f4
commit 4c4334aa55
1 changed files with 12 additions and 1 deletions

View File

@ -231,6 +231,12 @@ const navigateToTravelId = (id) => {
router.push({ path: `/travel/${id}` }); router.push({ path: `/travel/${id}` });
}; };
const stopEventPropagation = (event, col) => {
if (!['ref', 'id', 'supplier'].includes(col.name)) return;
event.preventDefault();
event.stopPropagation();
};
onMounted(async () => { onMounted(async () => {
stateStore.rightDrawer = true; stateStore.rightDrawer = true;
@ -280,7 +286,12 @@ onMounted(async () => {
@click="navigateToTravelId(props.row.id)" @click="navigateToTravelId(props.row.id)"
class="cursor-pointer" class="cursor-pointer"
> >
<QTd v-for="col in props.cols" :key="col.name" :props="props"> <QTd
v-for="col in props.cols"
:key="col.name"
:props="props"
@click="stopEventPropagation($event, col)"
>
<component <component
:is="tableColumnComponents[col.name].component" :is="tableColumnComponents[col.name].component"
class="col-content" class="col-content"