File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 1
1
import { usePaginatedData } from './usePaginatedData' ;
2
2
import cloneDeep from 'lodash-es/cloneDeep' ;
3
- import { DataTableFilterMetaData , DataTableFilterEvent , DataTableSortEvent } from 'primevue' ;
3
+ import {
4
+ DataTableFilterMetaData ,
5
+ DataTableFilterEvent ,
6
+ DataTableSortEvent ,
7
+ } from 'primevue' ;
4
8
import { PrimeVueDataFilters } from '@/types' ;
5
9
6
10
export function useLazyDataTable (
@@ -97,4 +101,4 @@ export function useLazyDataTable(
97
101
sort,
98
102
reset,
99
103
} ;
100
- }
104
+ }
Original file line number Diff line number Diff line change @@ -6,11 +6,7 @@ import cloneDeep from 'lodash-es/cloneDeep';
6
6
import { PageState , DataTablePageEvent } from 'primevue' ;
7
7
import { PrimeVueDataFilters } from '@/types' ;
8
8
9
- // TODO: npm install qs
10
- // const queryString = window.location.search;
11
- // const parsed = qs.parse(queryString, { ignoreQueryPrefix: true });
12
-
13
- interface PaginatedFilterableSortableQueryParams {
9
+ interface PaginatedFilteredSortedQueryParams {
14
10
filters ?: PrimeVueDataFilters ;
15
11
page ?: string ;
16
12
rows ?: string ;
@@ -33,7 +29,7 @@ export function usePaginatedData(
33
29
) {
34
30
const page = usePage < {
35
31
request : {
36
- urlParams : PaginatedFilterableSortableQueryParams ;
32
+ urlParams : PaginatedFilteredSortedQueryParams ;
37
33
} ;
38
34
} > ( ) ;
39
35
@@ -172,7 +168,7 @@ export function usePaginatedData(
172
168
} ) ;
173
169
}
174
170
175
- function parseUrlParams ( urlParams : PaginatedFilterableSortableQueryParams ) {
171
+ function parseUrlParams ( urlParams : PaginatedFilteredSortedQueryParams ) {
176
172
filters . value = {
177
173
...cloneDeep ( initialFilters ) ,
178
174
...urlParams ?. filters ,
@@ -208,4 +204,4 @@ export function usePaginatedData(
208
204
reset,
209
205
parseUrlParams,
210
206
} ;
211
- }
207
+ }
You can’t perform that action at this time.
0 commit comments