fix: update resource page
Build, Test, and Push CFDM Docker Image / test (push) Successful in 4m0s
Build, Test, and Push CFDM Docker Image / build-and-push (push) Successful in 2m10s
Build, Test, and Push CFDM Docker Image / update-wiki (push) Successful in 6s
Build, Test, and Push CFDM Docker Image / create-release (push) Has been skipped
Build, Test, and Push CFDM Docker Image / test (push) Successful in 4m0s
Build, Test, and Push CFDM Docker Image / build-and-push (push) Successful in 2m10s
Build, Test, and Push CFDM Docker Image / update-wiki (push) Successful in 6s
Build, Test, and Push CFDM Docker Image / create-release (push) Has been skipped
This commit is contained in:
@@ -195,6 +195,22 @@ export function ResourcePage<T extends object>({
|
||||
resetPagination()
|
||||
}, [onClearFilters, resetPagination])
|
||||
|
||||
useEffect(() => {
|
||||
if (isLoading || isError || (data.length === 0 && emptyState)) return
|
||||
const el = frameRef.current
|
||||
if (!el) return
|
||||
debugAgentLog(
|
||||
'resource-page.tsx:mount',
|
||||
'resource page width',
|
||||
{
|
||||
title,
|
||||
clientWidth: el.clientWidth,
|
||||
maxWidth: getComputedStyle(el).maxWidth,
|
||||
},
|
||||
'A',
|
||||
)
|
||||
}, [title, isLoading, isError, data.length, emptyState])
|
||||
|
||||
if (isLoading) {
|
||||
return <ResourcePageSkeleton />
|
||||
}
|
||||
@@ -227,21 +243,6 @@ export function ResourcePage<T extends object>({
|
||||
|
||||
const emptyMessage = 'Нет записей по выбранным фильтрам.'
|
||||
|
||||
useEffect(() => {
|
||||
const el = frameRef.current
|
||||
if (!el) return
|
||||
debugAgentLog(
|
||||
'resource-page.tsx:mount',
|
||||
'resource page width',
|
||||
{
|
||||
title,
|
||||
clientWidth: el.clientWidth,
|
||||
maxWidth: getComputedStyle(el).maxWidth,
|
||||
},
|
||||
'A',
|
||||
)
|
||||
}, [title])
|
||||
|
||||
return (
|
||||
<div ref={frameRef} className="w-full">
|
||||
<DataGrid
|
||||
|
||||
Reference in New Issue
Block a user