Parcourir la source

fix search doesnt have loading for paging

CR023
Jason Chuang il y a 1 mois
Parent
révision
d1e78cda0c
1 fichiers modifiés avec 11 ajouts et 2 suppressions
  1. +11
    -2
      src/components/FiDataGrid.js

+ 11
- 2
src/components/FiDataGrid.js Voir le fichier

@@ -135,7 +135,7 @@ export function FiDataGrid({ rows, columns, sx, autoHeight = true,

useEffect(() => {
getDataList();
}, [_doLoad, page]);
}, [_doLoad, page, pageSize]);


useEffect(() => {
@@ -232,7 +232,12 @@ export function FiDataGrid({ rows, columns, sx, autoHeight = true,
localStorage.setItem('searchCriteria', JSON.stringify({path:window.location.pathname,data:_doLoad.params}))
}
}

setLoading(true);
if (applyGridOnReady !== undefined) {
applyGridOnReady(true);
}

HttpUtils.get({
url: _doLoad.url,
params: _doLoad.params,
@@ -324,6 +329,10 @@ export function FiDataGrid({ rows, columns, sx, autoHeight = true,
'& .MuiDataGrid-virtualScroller': {
overflowY: height || maxHeight ? 'auto' : 'visible',
overflowX: height || maxHeight ? 'auto' : 'visible',
...(loading && { filter: 'blur(2px)' }),
},
'& .MuiDataGrid-overlay': {
backgroundColor: 'rgba(255, 255, 255, 0.55)',
},
// 👇 completely hide the footer when pagination is off
...(!effectivePagination && {


Chargement…
Annuler
Enregistrer