From bb1ddf59007613c3fc9b88d8e422c4a237294544 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Wed, 31 Jan 2024 21:22:32 -0300 Subject: [PATCH] add table rows selection --- src/pages/Entry/EntryLatestBuys.vue | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/pages/Entry/EntryLatestBuys.vue b/src/pages/Entry/EntryLatestBuys.vue index d60723403..e12354940 100644 --- a/src/pages/Entry/EntryLatestBuys.vue +++ b/src/pages/Entry/EntryLatestBuys.vue @@ -20,6 +20,7 @@ const { t } = useI18n(); const visibleColumns = ref([]); const allColumnNames = ref([]); const rows = ref([]); +const rowsSelected = ref([]); const columns = computed(() => [ { label: t('entry.latestBuys.picture'), @@ -203,6 +204,10 @@ const columns = computed(() => [ }, ]); +const openEditRowField = () => { + console.log('open edit row form: ', rowsSelected.value); +}; + onMounted(async () => { stateStore.rightDrawer = true; const filteredColumns = columns.value.filter((col) => col.name !== 'picture'); @@ -239,10 +244,12 @@ onMounted(async () => { :rows="rows" :columns="columns" hide-bottom + selection="multiple" row-key="id" :pagination="{ rowsPerPage: 0 }" class="full-width q-mt-md" :visible-columns="visibleColumns" + v-model:selected="rowsSelected" > + + + + {{ t('Edit buy(s)') }} + + es: + Edit buy(s): Editar compra(s)