Przeglądaj źródła

fix search doesnt have loading for paging

CR023
Jason Chuang 1 miesiąc temu
rodzic
commit
d1e78cda0c
1 zmienionych plików z 11 dodań i 2 usunięć
  1. +11
    -2
      src/components/FiDataGrid.js

+ 11
- 2
src/components/FiDataGrid.js Wyświetl plik

@@ -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 && {


Ładowanie…
Anuluj
Zapisz