File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1314,7 +1314,7 @@ <h3>Derive VM</h3>
13141314 const searchQuery = ref ( '' ) ;
13151315 const currentPage = ref ( 1 ) ;
13161316 const pageInput = ref ( 1 ) ;
1317- const pageSize = ref ( 50 ) ;
1317+ const pageSize = ref ( parseInt ( localStorage . getItem ( 'pageSize' ) ) || 50 ) ;
13181318 const totalVMs = ref ( 0 ) ;
13191319 const hasMorePages = ref ( false ) ;
13201320 const loadingVMDetails = ref ( false ) ;
@@ -2240,6 +2240,16 @@ <h3>Derive VM</h3>
22402240 }
22412241 } , { deep : true } ) ;
22422242
2243+ // Watch for changes to searchQuery and reset page to 1
2244+ watch ( searchQuery , ( ) => {
2245+ currentPage . value = 1 ;
2246+ pageInput . value = 1 ;
2247+ } ) ;
2248+
2249+ watch ( pageSize , ( newValue ) => {
2250+ localStorage . setItem ( 'pageSize' , newValue ) ;
2251+ } ) ;
2252+
22432253 return {
22442254 vms,
22452255 vmForm,
You can’t perform that action at this time.
0 commit comments