<Datatable
:loading="loading"
:header="tableHeader"
:data="tableData"
:total="countData"
:current-page="params.offset + 1"
@page-change="changePage"
@on-items-per-page-change="changeRowsPerPageLimit"
@on-sort="handleSort"
>
const fetchData = async () => {
loading.value = true;
const { data, params: updatedParams } = await DataTablesService.fetchDatax(urlPagination, params.value);
tableData.value = data.records;
countData.value = data.totalCount;
params.value = updatedParams; // Update params in the component
DataTablesService.saveParamsToStorage(updatedParams);
loading.value = false;
};
FIXED WITH THIS on table footer component but i dont know it will be bugs on my project next. LOL
watch(
() => props.count,
() => {
if(page.value == 0){ ///ADED VALUE ON THIS
page.value = 1
}
// page.value = 1;
}
);