From 209878277a178ab91d48b523265e5ffb1b8cf7e6 Mon Sep 17 00:00:00 2001
From: chen.lin <1442464845@qq.com>
Date: 星期一, 09 三月 2026 16:18:21 +0800
Subject: [PATCH] 库位转移,优化查询速度
---
rsf-admin/src/page/components/StickyDataTable.jsx | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/rsf-admin/src/page/components/StickyDataTable.jsx b/rsf-admin/src/page/components/StickyDataTable.jsx
index d5f8b0f..2eaa4b6 100644
--- a/rsf-admin/src/page/components/StickyDataTable.jsx
+++ b/rsf-admin/src/page/components/StickyDataTable.jsx
@@ -1,5 +1,5 @@
-import React, { useMemo } from 'react';
+import React, { useMemo, useRef, useEffect } from 'react';
import { DataTable, useDataTableDataContext, useTranslate } from 'react-admin';
import { TableFooter, TableRow, TableCell } from '@mui/material';
@@ -218,7 +218,21 @@
};
}, [bulkActionsOffsetY]);
+ const containerRef = useRef(null);
+ useEffect(() => {
+ const el = containerRef.current;
+ if (!el) return;
+ const clearExpandIconAriaHidden = () => {
+ el.querySelectorAll('.RaDataTable-expandIcon').forEach((btn) => btn.removeAttribute('aria-hidden'));
+ };
+ clearExpandIconAriaHidden();
+ const mo = new MutationObserver(clearExpandIconAriaHidden);
+ mo.observe(el, { attributes: true, attributeFilter: ['aria-hidden'], subtree: true });
+ return () => mo.disconnect();
+ }, []);
+
return (
+ <span ref={containerRef} style={{ display: 'contents' }}>
<DataTable {...props} foot={footerComponent} sx={dataTableStyles}>
{/* {processedChildren} */}
{processedChildren
@@ -234,6 +248,7 @@
))
}
</DataTable>
+ </span>
);
};
--
Gitblit v1.9.1