Compare commits
8 Commits
dev
...
8207-hotfi
Author | SHA1 | Date |
---|---|---|
Jorge Penadés | 8b52629b0b | |
Jorge Penadés | 3a4c0e729a | |
Jorge Penadés | 9d8698fa2f | |
Jorge Penadés | 661cc0b5ee | |
Jorge Penadés | 0eeb22d40a | |
Jorge Penadés | 7048f96565 | |
Jorge Penadés | 50fbf64cf9 | |
Jorge Penadés | c72fa52851 |
|
@ -130,10 +130,19 @@ const addFilter = async (filter, params) => {
|
|||
await arrayData.addFilter({ filter, params });
|
||||
};
|
||||
|
||||
async function fetch(params) {
|
||||
async function fetch(params, keepPagination = false) {
|
||||
useArrayData(props.dataKey, params);
|
||||
arrayData.reset(['filter.skip', 'skip']);
|
||||
await arrayData.fetch({ append: false });
|
||||
|
||||
if (!keepPagination) await arrayData.fetch({ append: false });
|
||||
else {
|
||||
const { limit, skip } = store;
|
||||
store.limit = limit + skip;
|
||||
store.skip = 0;
|
||||
await arrayData.fetch({ append: false });
|
||||
store.limit = limit;
|
||||
store.skip = skip;
|
||||
}
|
||||
|
||||
if (!store.hasMoreData) isLoading.value = false;
|
||||
|
||||
emit('onFetch', store.data);
|
||||
|
|
|
@ -352,7 +352,7 @@ const openTab = (id) =>
|
|||
class="q-mr-sm"
|
||||
dense
|
||||
flat
|
||||
@click="$refs.tableRef.reload()"
|
||||
@click="tableRef.CrudModelRef.vnPaginateRef.fetch(undefined, true)"
|
||||
>
|
||||
<QTooltip>{{ $t('globals.refresh') }}</QTooltip>
|
||||
</QBtn>
|
||||
|
|
Loading…
Reference in New Issue