From d1e78cda0c709dd73668b1fd9166d2eab6ef115f Mon Sep 17 00:00:00 2001 From: Jason Chuang Date: Sun, 16 Aug 2026 01:45:11 +0800 Subject: [PATCH] fix search doesnt have loading for paging --- src/components/FiDataGrid.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/components/FiDataGrid.js b/src/components/FiDataGrid.js index d8fd6620..cef7b661 100644 --- a/src/components/FiDataGrid.js +++ b/src/components/FiDataGrid.js @@ -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 && {