diff --git a/src/components/TableHistory.vue b/src/components/TableHistory.vue index 95d0c05..2d0e8a6 100644 --- a/src/components/TableHistory.vue +++ b/src/components/TableHistory.vue @@ -9,6 +9,7 @@ import { useChekIn } from '@/stores/chekin' import Popup from '@/components/PopUp.vue' const stores = useChekIn() +const selected = ref([]) /** props from page */ const props = defineProps({ @@ -16,6 +17,10 @@ const props = defineProps({ type: Boolean, defualt: false, }, + selected: { + type: Array, + defualt: [], + }, pageSize: { type: Number, defualt: 10, @@ -84,7 +89,7 @@ const initialPagination = ref({ sortBy: null, descending: false, page: 1, - rowsPerPage: props.pageSize, + rowsPerPage: 1, }) // Pagination - update rowsPerPage @@ -157,7 +162,7 @@ const columns = ref([ field: 'checkOutStatus', headerStyle: 'font-size: 14px', style: 'font-size: 14px; width:15%;', - } + }, ]) // popup const modalPopup = ref(false) @@ -187,11 +192,6 @@ function classStatus(status: string) { } } -const pagination = ref({ - page: 1, - rowsPerPage: 2, -}) - const checkRequestEdit = (checkInStatus: string, checkOutStatus: string) => { if ( checkInStatus === 'ขาด' || @@ -212,10 +212,11 @@ const checkRequestEdit = (checkInStatus: string, checkOutStatus: string) => { :columns="columns" :rows="stores.rows" virtual-scroll + v-model:selected="selected" :virtual-scroll-sticky-size-start="48" :style="$q.screen.gt.xs ? 'max-height: 64vh' : ''" :grid="$q.screen.gt.xs ? false : true" - v-model:pagination="pagination" + :pagination="initialPagination" @update:pagination="updatePagination" > -