0
0
Fork 0

fix: dynamic fetch

This commit is contained in:
Jorge Penadés 2024-09-06 09:27:55 +02:00
parent 1662e3b459
commit 5d91b03f9a
1 changed files with 4 additions and 9 deletions

View File

@ -26,7 +26,6 @@ const { notify } = useNotify();
const rowsSelected = ref([]); const rowsSelected = ref([]);
const entryBuysPaginateRef = ref(null); const entryBuysPaginateRef = ref(null);
const packagingsOptions = ref(null);
const originalRowDataCopy = ref(null); const originalRowDataCopy = ref(null);
const getInputEvents = (colField, props) => { const getInputEvents = (colField, props) => {
@ -66,7 +65,10 @@ const tableColumnComponents = computed(() => ({
'map-options': true, 'map-options': true,
'use-input': true, 'use-input': true,
'hide-selected': true, 'hide-selected': true,
options: packagingsOptions.value, url: 'Packagings',
fields: ['id'],
where: { freightItemFk: true },
'sort-by': 'id ASC',
dense: true, dense: true,
}, },
event: getInputEvents, event: getInputEvents,
@ -304,13 +306,6 @@ const lockIconType = (groupingMode, mode) => {
</script> </script>
<template> <template>
<FetchData
ref="expensesRef"
url="Packagings"
:filter="{ fields: ['id'], where: { freightItemFk: true }, order: 'id ASC' }"
auto-load
@on-fetch="(data) => (packagingsOptions = data)"
/>
<VnSubToolbar> <VnSubToolbar>
<template #st-actions> <template #st-actions>
<QBtnGroup push style="column-gap: 10px"> <QBtnGroup push style="column-gap: 10px">