File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
packages/platform/src/app/routes/list/standard-table Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -28,14 +28,15 @@ export default function StandardTable(): JSX.Element | null {
28
28
const { t } = useTranslation ( ) ;
29
29
const modelApi = useAPI ( '/device/model' ) ;
30
30
const deviceApi = useAPI ( '/device' ) ;
31
- const [ deviceQuery , setDeviceQuery ] = useQueryParams < DeviceQueryParams > ( {
31
+ const [ initDeviceQuery , saveDeviceQuery ] = useQueryParams < DeviceQueryParams > ( {
32
32
keyword : '' ,
33
33
sort : '-id' ,
34
34
model : null ,
35
35
status : [ ] ,
36
36
page : 1 ,
37
37
pageSize : 10 ,
38
38
} ) ;
39
+ const [ deviceQuery , setDeviceQuery ] = useImmer ( initDeviceQuery ) ;
39
40
const [ deviceTable , setDeviceTable ] = useImmer ( {
40
41
loading : true ,
41
42
list : [ ] as DeviceDoc [ ] ,
@@ -73,6 +74,8 @@ export default function StandardTable(): JSX.Element | null {
73
74
74
75
const [ updateDeviceTable , setUpdateDeviceTable ] = useState ( 0 ) ;
75
76
useEffect ( ( ) => {
77
+ saveDeviceQuery ( deviceQuery ) ;
78
+
76
79
const apiQuery : any = {
77
80
page : deviceQuery . page ,
78
81
page_size : deviceQuery . pageSize ,
You can’t perform that action at this time.
0 commit comments