@ehfuse/mui-virtual-data-table 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/VirtualDataTable.d.ts +1 -1
- package/dist/index.esm.js +146 -31
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +145 -30
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +4 -0
- package/package.json +2 -2
- package/dist/OverlayScrollbar.d.ts +0 -81
- package/dist/VirtuosoScrollbar.d.ts +0 -31
- package/dist/components/Loading.d.ts +0 -29
- package/dist/components/Scrollbar.d.ts +0 -39
- package/dist/original/VirtualDataTable copy.d.ts +0 -78
- package/dist/original/VirtuosoScrollbar.d.ts +0 -31
- package/dist/utils/dragScrollUtils.d.ts +0 -39
package/dist/index.js
CHANGED
|
@@ -533,6 +533,21 @@ showScrollbar = true, }, ref) => {
|
|
|
533
533
|
const thumbMinHeight = finalThumbConfig.minHeight;
|
|
534
534
|
const showArrows = finalArrowsConfig.visible;
|
|
535
535
|
const arrowStep = finalArrowsConfig.step;
|
|
536
|
+
// 포커스 유지 함수 (키보드 입력이 계속 작동하도록)
|
|
537
|
+
const maintainFocus = react.useCallback(() => {
|
|
538
|
+
if (!containerRef.current)
|
|
539
|
+
return;
|
|
540
|
+
// 현재 포커스된 요소 확인
|
|
541
|
+
const activeElement = document.activeElement;
|
|
542
|
+
// 오버레이 스크롤바 내부에 이미 포커스된 요소가 있으면 스킵
|
|
543
|
+
if (activeElement &&
|
|
544
|
+
containerRef.current.contains(activeElement) &&
|
|
545
|
+
activeElement !== containerRef.current) {
|
|
546
|
+
return;
|
|
547
|
+
}
|
|
548
|
+
// 포커스된 요소가 없거나 외부에 있으면 컨테이너에 포커스
|
|
549
|
+
containerRef.current.focus();
|
|
550
|
+
}, []);
|
|
536
551
|
// ref를 통해 외부에서 스크롤 컨테이너에 접근할 수 있도록 함
|
|
537
552
|
react.useImperativeHandle(ref, () => ({
|
|
538
553
|
getScrollContainer: () => containerRef.current,
|
|
@@ -656,7 +671,6 @@ showScrollbar = true, }, ref) => {
|
|
|
656
671
|
]);
|
|
657
672
|
// 썸 드래그 시작
|
|
658
673
|
const handleThumbMouseDown = react.useCallback((event) => {
|
|
659
|
-
var _a;
|
|
660
674
|
event.preventDefault();
|
|
661
675
|
event.stopPropagation();
|
|
662
676
|
const actualScrollContainer = findScrollableElement();
|
|
@@ -671,8 +685,8 @@ showScrollbar = true, }, ref) => {
|
|
|
671
685
|
clearHideTimer();
|
|
672
686
|
setScrollbarVisible(true);
|
|
673
687
|
// 포커스 유지 (키보드 입력이 계속 작동하도록)
|
|
674
|
-
(
|
|
675
|
-
}, [findScrollableElement, clearHideTimer]);
|
|
688
|
+
maintainFocus();
|
|
689
|
+
}, [findScrollableElement, clearHideTimer, maintainFocus]);
|
|
676
690
|
// 썸 드래그 중
|
|
677
691
|
const handleMouseMove = react.useCallback((event) => {
|
|
678
692
|
if (!isDragging)
|
|
@@ -706,7 +720,6 @@ showScrollbar = true, }, ref) => {
|
|
|
706
720
|
}, [isScrollable, setHideTimer, finalAutoHideConfig.delay]);
|
|
707
721
|
// 트랙 클릭으로 스크롤 점프
|
|
708
722
|
const handleTrackClick = react.useCallback((event) => {
|
|
709
|
-
var _a;
|
|
710
723
|
if (!scrollbarRef.current) {
|
|
711
724
|
return;
|
|
712
725
|
}
|
|
@@ -726,16 +739,16 @@ showScrollbar = true, }, ref) => {
|
|
|
726
739
|
setScrollbarVisible(true);
|
|
727
740
|
setHideTimer(finalAutoHideConfig.delay);
|
|
728
741
|
// 포커스 유지 (키보드 입력이 계속 작동하도록)
|
|
729
|
-
(
|
|
742
|
+
maintainFocus();
|
|
730
743
|
}, [
|
|
731
744
|
updateScrollbar,
|
|
732
745
|
setHideTimer,
|
|
733
746
|
finalAutoHideConfig.delay,
|
|
734
747
|
findScrollableElement,
|
|
748
|
+
maintainFocus,
|
|
735
749
|
]);
|
|
736
750
|
// 위쪽 화살표 클릭 핸들러
|
|
737
751
|
const handleUpArrowClick = react.useCallback((event) => {
|
|
738
|
-
var _a;
|
|
739
752
|
event.preventDefault();
|
|
740
753
|
event.stopPropagation();
|
|
741
754
|
if (!containerRef.current)
|
|
@@ -746,16 +759,16 @@ showScrollbar = true, }, ref) => {
|
|
|
746
759
|
setScrollbarVisible(true);
|
|
747
760
|
setHideTimer(finalAutoHideConfig.delay);
|
|
748
761
|
// 포커스 유지 (키보드 입력이 계속 작동하도록)
|
|
749
|
-
(
|
|
762
|
+
maintainFocus();
|
|
750
763
|
}, [
|
|
751
764
|
updateScrollbar,
|
|
752
765
|
setHideTimer,
|
|
753
766
|
arrowStep,
|
|
754
767
|
finalAutoHideConfig.delay,
|
|
768
|
+
maintainFocus,
|
|
755
769
|
]);
|
|
756
770
|
// 아래쪽 화살표 클릭 핸들러
|
|
757
771
|
const handleDownArrowClick = react.useCallback((event) => {
|
|
758
|
-
var _a;
|
|
759
772
|
event.preventDefault();
|
|
760
773
|
event.stopPropagation();
|
|
761
774
|
if (!containerRef.current || !contentRef.current)
|
|
@@ -769,12 +782,13 @@ showScrollbar = true, }, ref) => {
|
|
|
769
782
|
setScrollbarVisible(true);
|
|
770
783
|
setHideTimer(finalAutoHideConfig.delay);
|
|
771
784
|
// 포커스 유지 (키보드 입력이 계속 작동하도록)
|
|
772
|
-
(
|
|
785
|
+
maintainFocus();
|
|
773
786
|
}, [
|
|
774
787
|
updateScrollbar,
|
|
775
788
|
setHideTimer,
|
|
776
789
|
arrowStep,
|
|
777
790
|
finalAutoHideConfig.delay,
|
|
791
|
+
maintainFocus,
|
|
778
792
|
]);
|
|
779
793
|
// 드래그 스크롤 시작
|
|
780
794
|
const handleDragScrollStart = react.useCallback((event) => {
|
|
@@ -1022,7 +1036,7 @@ showScrollbar = true, }, ref) => {
|
|
|
1022
1036
|
return () => clearTimeout(timer);
|
|
1023
1037
|
}, [updateScrollbar]);
|
|
1024
1038
|
// 컴포넌트 초기화 완료 표시 (hover 이벤트 활성화용)
|
|
1025
|
-
react.
|
|
1039
|
+
react.useLayoutEffect(() => {
|
|
1026
1040
|
const timer = setTimeout(() => {
|
|
1027
1041
|
setIsInitialized(true);
|
|
1028
1042
|
// 초기화 후 스크롤바 업데이트 (썸 높이 정확하게 계산)
|
|
@@ -1031,11 +1045,7 @@ showScrollbar = true, }, ref) => {
|
|
|
1031
1045
|
if (!finalAutoHideConfig.enabled && isScrollable()) {
|
|
1032
1046
|
setScrollbarVisible(true);
|
|
1033
1047
|
}
|
|
1034
|
-
|
|
1035
|
-
if (containerRef.current) {
|
|
1036
|
-
containerRef.current.focus();
|
|
1037
|
-
}
|
|
1038
|
-
}, 100);
|
|
1048
|
+
}, 0);
|
|
1039
1049
|
return () => clearTimeout(timer);
|
|
1040
1050
|
}, [isScrollable, updateScrollbar, finalAutoHideConfig.enabled]);
|
|
1041
1051
|
// Resize observer로 크기 변경 감지
|
|
@@ -1265,7 +1275,7 @@ const OVERLAY_SCROLLBAR_TRACK_CONFIG = {
|
|
|
1265
1275
|
/**
|
|
1266
1276
|
* 데이터 기반 무한 스크롤 및 가상화를 지원하는 테이블 컴포넌트
|
|
1267
1277
|
*/
|
|
1268
|
-
function VirtualDataTableComponent({ data, loading = false, columns, onRowClick, rowHeight = 50, columnHeight = 56, striped, rowDivider = true, onSort, onLoadMore, sortBy, sortDirection, showPaper = true, paddingX = "1rem", scrollbars, emptyMessage = "NO DATA", LoadingComponent, }) {
|
|
1278
|
+
function VirtualDataTableComponent({ data, loading = false, columns, onRowClick, rowHeight = 50, columnHeight = 56, striped, rowDivider = true, onSort, onLoadMore, sortBy, sortDirection, showPaper = true, paddingX = "1rem", paddingTop = 0, paddingBottom = 0, rowHoverColor, rowHoverOpacity, scrollbars, emptyMessage = "NO DATA", LoadingComponent, }) {
|
|
1269
1279
|
// console.log("=== VirtualDataTable 렌더링 ===", {
|
|
1270
1280
|
// dataLength: data.length,
|
|
1271
1281
|
// loading,
|
|
@@ -1305,11 +1315,13 @@ function VirtualDataTableComponent({ data, loading = false, columns, onRowClick,
|
|
|
1305
1315
|
},
|
|
1306
1316
|
"& .MuiTable-root": {
|
|
1307
1317
|
paddingRight: paddingX,
|
|
1318
|
+
paddingTop: paddingTop,
|
|
1319
|
+
paddingBottom: paddingBottom,
|
|
1308
1320
|
},
|
|
1309
1321
|
} }) }));
|
|
1310
1322
|
}),
|
|
1311
1323
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1312
|
-
[] // 빈 배열: 최초 마운트 시에만 생성, scrollbars
|
|
1324
|
+
[] // 빈 배열: 최초 마운트 시에만 생성, scrollbars, paddingX, paddingTop, paddingBottom은 클로저로 고정
|
|
1313
1325
|
);
|
|
1314
1326
|
// Striped row 배경색 계산
|
|
1315
1327
|
const stripedRowColor = react.useMemo(() => {
|
|
@@ -1352,6 +1364,9 @@ function VirtualDataTableComponent({ data, loading = false, columns, onRowClick,
|
|
|
1352
1364
|
const isMouseDownRef = react.useRef(false);
|
|
1353
1365
|
const initialScrollTopRef = react.useRef(0);
|
|
1354
1366
|
const totalDragDistanceRef = react.useRef(0);
|
|
1367
|
+
const isScrollDraggingRef = react.useRef(false); // OverlayScrollbar 드래그 스크롤 감지용
|
|
1368
|
+
const mouseDownPositionRef = react.useRef({ x: 0, y: 0 }); // 마우스 다운 시작 위치
|
|
1369
|
+
react.useRef(null);
|
|
1355
1370
|
/**
|
|
1356
1371
|
* 마우스 버튼 누름 이벤트 핸들러
|
|
1357
1372
|
* OverlayScrollbar 사용시에는 기본 드래그 스크롤을 비활성화
|
|
@@ -1376,7 +1391,6 @@ function VirtualDataTableComponent({ data, loading = false, columns, onRowClick,
|
|
|
1376
1391
|
// DOM 스타일 직접 변경 (리렌더링 방지)
|
|
1377
1392
|
if (scrollContainerRef.current) {
|
|
1378
1393
|
scrollContainerRef.current.style.userSelect = "none";
|
|
1379
|
-
scrollContainerRef.current.style.webkitUserSelect = "none";
|
|
1380
1394
|
}
|
|
1381
1395
|
}
|
|
1382
1396
|
if (isDraggingRef.current) {
|
|
@@ -1420,7 +1434,6 @@ function VirtualDataTableComponent({ data, loading = false, columns, onRowClick,
|
|
|
1420
1434
|
// DOM 스타일 초기화
|
|
1421
1435
|
if (scrollContainerRef.current) {
|
|
1422
1436
|
scrollContainerRef.current.style.userSelect = "auto";
|
|
1423
|
-
scrollContainerRef.current.style.webkitUserSelect = "auto";
|
|
1424
1437
|
}
|
|
1425
1438
|
}, []);
|
|
1426
1439
|
// 정렬이 변경될 때 모든 TableSortLabel의 hover 상태 초기화
|
|
@@ -1463,8 +1476,8 @@ function VirtualDataTableComponent({ data, loading = false, columns, onRowClick,
|
|
|
1463
1476
|
return;
|
|
1464
1477
|
}
|
|
1465
1478
|
window.lastRangeChangeTime = now;
|
|
1466
|
-
// 더 보수적인 조건:
|
|
1467
|
-
const bufferSize = Math.max(10, Math.floor(data.length * 0.
|
|
1479
|
+
// 더 보수적인 조건: 90% 지점에서 로드 (기존 VirtualDataTable 방식)
|
|
1480
|
+
const bufferSize = Math.max(10, Math.floor(data.length * 0.1)); // 데이터의 10% 또는 최소 10개
|
|
1468
1481
|
const shouldLoadMore = range.endIndex >= data.length - bufferSize;
|
|
1469
1482
|
// 추가 조건: 최소 30개 이상의 데이터에서만 더 가져오기 실행
|
|
1470
1483
|
const hasMinimumData = data.length >= 30;
|
|
@@ -1540,7 +1553,6 @@ function VirtualDataTableComponent({ data, loading = false, columns, onRowClick,
|
|
|
1540
1553
|
width: col.width,
|
|
1541
1554
|
minWidth: col.width,
|
|
1542
1555
|
...col.style,
|
|
1543
|
-
backgroundColor: "#ffffff",
|
|
1544
1556
|
fontWeight: "bold",
|
|
1545
1557
|
position: "sticky",
|
|
1546
1558
|
top: 0,
|
|
@@ -1601,7 +1613,6 @@ function VirtualDataTableComponent({ data, loading = false, columns, onRowClick,
|
|
|
1601
1613
|
width: col.width,
|
|
1602
1614
|
minWidth: col.width,
|
|
1603
1615
|
...col.style,
|
|
1604
|
-
backgroundColor: "#ffffff",
|
|
1605
1616
|
fontWeight: "bold",
|
|
1606
1617
|
position: "sticky",
|
|
1607
1618
|
top: 0,
|
|
@@ -1663,7 +1674,6 @@ function VirtualDataTableComponent({ data, loading = false, columns, onRowClick,
|
|
|
1663
1674
|
},
|
|
1664
1675
|
} })] }) })) : (col.text) }, String(col.id)))),
|
|
1665
1676
|
...Object.entries(groupMap).map(([group, cols]) => (jsxRuntime.jsx(material.TableCell, { align: "center", colSpan: cols.length, style: {
|
|
1666
|
-
backgroundColor: "#ffffff",
|
|
1667
1677
|
fontWeight: "bold",
|
|
1668
1678
|
position: "sticky",
|
|
1669
1679
|
top: 0,
|
|
@@ -1678,7 +1688,6 @@ function VirtualDataTableComponent({ data, loading = false, columns, onRowClick,
|
|
|
1678
1688
|
width: col.width,
|
|
1679
1689
|
minWidth: col.width,
|
|
1680
1690
|
...col.style,
|
|
1681
|
-
backgroundColor: "#ffffff",
|
|
1682
1691
|
fontWeight: "bold",
|
|
1683
1692
|
position: "sticky",
|
|
1684
1693
|
top: 0,
|
|
@@ -1778,7 +1787,6 @@ function VirtualDataTableComponent({ data, loading = false, columns, onRowClick,
|
|
|
1778
1787
|
height: columnHeight,
|
|
1779
1788
|
"& th": {
|
|
1780
1789
|
padding: "16px",
|
|
1781
|
-
backgroundColor: "#ffffff",
|
|
1782
1790
|
position: "sticky",
|
|
1783
1791
|
top: 0,
|
|
1784
1792
|
zIndex: 2,
|
|
@@ -1793,10 +1801,32 @@ function VirtualDataTableComponent({ data, loading = false, columns, onRowClick,
|
|
|
1793
1801
|
// react-virtuoso는 'data-index' 속성으로 index를 전달합니다
|
|
1794
1802
|
const rowIndex = rest["data-index"] ?? 0;
|
|
1795
1803
|
const isOddRow = rowIndex % 2 === 1;
|
|
1796
|
-
return (jsxRuntime.jsx(material.TableRow, { ...rest,
|
|
1797
|
-
|
|
1804
|
+
return (jsxRuntime.jsx(material.TableRow, { ...rest, onMouseDown: (e) => {
|
|
1805
|
+
// 마우스 다운 시 드래그 플래그 초기화 및 시작 위치 저장
|
|
1806
|
+
isScrollDraggingRef.current = false;
|
|
1807
|
+
mouseDownPositionRef.current = {
|
|
1808
|
+
x: e.clientX,
|
|
1809
|
+
y: e.clientY,
|
|
1810
|
+
};
|
|
1811
|
+
}, onMouseMove: (e) => {
|
|
1812
|
+
// 마우스가 5px 이상 움직였을 때만 드래그로 간주
|
|
1813
|
+
const deltaX = Math.abs(e.clientX - mouseDownPositionRef.current.x);
|
|
1814
|
+
const deltaY = Math.abs(e.clientY - mouseDownPositionRef.current.y);
|
|
1815
|
+
const dragThreshold = 5; // 5px 임계값
|
|
1816
|
+
if (deltaX > dragThreshold ||
|
|
1817
|
+
deltaY > dragThreshold) {
|
|
1818
|
+
isScrollDraggingRef.current = true;
|
|
1819
|
+
}
|
|
1820
|
+
}, onClick: () => {
|
|
1821
|
+
// 드래그 스크롤이 아니고, 아이템이 있고, onRowClick이 있을 때만 실행
|
|
1822
|
+
if (!isScrollDraggingRef.current &&
|
|
1823
|
+
!isDraggingRef.current &&
|
|
1824
|
+
item &&
|
|
1825
|
+
onRowClick) {
|
|
1798
1826
|
onRowClick(item, rowIndex);
|
|
1799
1827
|
}
|
|
1828
|
+
// 클릭 후 플래그 리셋
|
|
1829
|
+
isScrollDraggingRef.current = false;
|
|
1800
1830
|
}, sx: {
|
|
1801
1831
|
userSelect: "none",
|
|
1802
1832
|
height: rowHeight,
|
|
@@ -1815,7 +1845,85 @@ function VirtualDataTableComponent({ data, loading = false, columns, onRowClick,
|
|
|
1815
1845
|
},
|
|
1816
1846
|
"&:hover": onRowClick
|
|
1817
1847
|
? {
|
|
1818
|
-
backgroundColor:
|
|
1848
|
+
backgroundColor: (theme) => {
|
|
1849
|
+
const isDark = theme.palette.mode === "dark";
|
|
1850
|
+
const defaultColor = "#000000";
|
|
1851
|
+
const color = rowHoverColor ?? defaultColor;
|
|
1852
|
+
const opacity = rowHoverOpacity ?? 0.06;
|
|
1853
|
+
// hex를 rgb로 변환
|
|
1854
|
+
const hex = color.replace("#", "");
|
|
1855
|
+
let r = parseInt(hex.substring(0, 2), 16) / 255;
|
|
1856
|
+
let g = parseInt(hex.substring(2, 4), 16) / 255;
|
|
1857
|
+
let b = parseInt(hex.substring(4, 6), 16) / 255;
|
|
1858
|
+
// 다크 모드일 때 밝기만 반전 (HSL 변환)
|
|
1859
|
+
if (isDark) {
|
|
1860
|
+
// RGB to HSL
|
|
1861
|
+
const max = Math.max(r, g, b);
|
|
1862
|
+
const min = Math.min(r, g, b);
|
|
1863
|
+
let h = 0, s = 0, l = (max + min) / 2;
|
|
1864
|
+
if (max !== min) {
|
|
1865
|
+
const d = max - min;
|
|
1866
|
+
s =
|
|
1867
|
+
l > 0.5
|
|
1868
|
+
? d / (2 - max - min)
|
|
1869
|
+
: d / (max + min);
|
|
1870
|
+
switch (max) {
|
|
1871
|
+
case r:
|
|
1872
|
+
h =
|
|
1873
|
+
((g - b) / d +
|
|
1874
|
+
(g < b
|
|
1875
|
+
? 6
|
|
1876
|
+
: 0)) /
|
|
1877
|
+
6;
|
|
1878
|
+
break;
|
|
1879
|
+
case g:
|
|
1880
|
+
h =
|
|
1881
|
+
((b - r) / d +
|
|
1882
|
+
2) /
|
|
1883
|
+
6;
|
|
1884
|
+
break;
|
|
1885
|
+
case b:
|
|
1886
|
+
h =
|
|
1887
|
+
((r - g) / d +
|
|
1888
|
+
4) /
|
|
1889
|
+
6;
|
|
1890
|
+
break;
|
|
1891
|
+
}
|
|
1892
|
+
}
|
|
1893
|
+
// 밝기만 반전 (0.0 <-> 1.0)
|
|
1894
|
+
l = 1 - l;
|
|
1895
|
+
// HSL to RGB
|
|
1896
|
+
const hue2rgb = (p, q, t) => {
|
|
1897
|
+
if (t < 0)
|
|
1898
|
+
t += 1;
|
|
1899
|
+
if (t > 1)
|
|
1900
|
+
t -= 1;
|
|
1901
|
+
if (t < 1 / 6)
|
|
1902
|
+
return (p + (q - p) * 6 * t);
|
|
1903
|
+
if (t < 1 / 2)
|
|
1904
|
+
return q;
|
|
1905
|
+
if (t < 2 / 3)
|
|
1906
|
+
return (p +
|
|
1907
|
+
(q - p) *
|
|
1908
|
+
(2 / 3 - t) *
|
|
1909
|
+
6);
|
|
1910
|
+
return p;
|
|
1911
|
+
};
|
|
1912
|
+
if (s === 0) {
|
|
1913
|
+
r = g = b = l;
|
|
1914
|
+
}
|
|
1915
|
+
else {
|
|
1916
|
+
const q = l < 0.5
|
|
1917
|
+
? l * (1 + s)
|
|
1918
|
+
: l + s - l * s;
|
|
1919
|
+
const p = 2 * l - q;
|
|
1920
|
+
r = hue2rgb(p, q, h + 1 / 3);
|
|
1921
|
+
g = hue2rgb(p, q, h);
|
|
1922
|
+
b = hue2rgb(p, q, h - 1 / 3);
|
|
1923
|
+
}
|
|
1924
|
+
}
|
|
1925
|
+
return `rgba(${Math.round(r * 255)}, ${Math.round(g * 255)}, ${Math.round(b * 255)}, ${opacity})`;
|
|
1926
|
+
},
|
|
1819
1927
|
transition: "background-color 0.2s ease",
|
|
1820
1928
|
}
|
|
1821
1929
|
: {},
|
|
@@ -1830,6 +1938,8 @@ function VirtualDataTableComponent({ data, loading = false, columns, onRowClick,
|
|
|
1830
1938
|
stripedRowColor,
|
|
1831
1939
|
rowDivider,
|
|
1832
1940
|
columnHeight,
|
|
1941
|
+
rowHoverColor,
|
|
1942
|
+
rowHoverOpacity,
|
|
1833
1943
|
VirtuosoScroller,
|
|
1834
1944
|
]);
|
|
1835
1945
|
// 공통 테이블 내용
|
|
@@ -1837,6 +1947,11 @@ function VirtualDataTableComponent({ data, loading = false, columns, onRowClick,
|
|
|
1837
1947
|
position: "relative",
|
|
1838
1948
|
height: "100%",
|
|
1839
1949
|
width: "100%",
|
|
1950
|
+
"& .MuiTableHead-root": {
|
|
1951
|
+
backgroundColor: (theme) => theme.palette.mode === "dark"
|
|
1952
|
+
? "#1e1e1e !important"
|
|
1953
|
+
: "#ffffff !important",
|
|
1954
|
+
},
|
|
1840
1955
|
}, children: [jsxRuntime.jsx(reactVirtuoso.TableVirtuoso, { ref: virtuosoRef, data: data, totalCount: onLoadMore ? data.length + 1 : data.length, fixedHeaderContent: fixedHeaderContent, itemContent: rowContent, rangeChanged: handleRangeChange, components: VirtuosoTableComponents, style: { height: "100%" }, increaseViewportBy: { top: 100, bottom: 300 }, overscan: 5, followOutput: false }, tableKey), data.length === 0 && !loading && (jsxRuntime.jsx(material.Box, { sx: {
|
|
1841
1956
|
position: "absolute",
|
|
1842
1957
|
top: 0,
|
|
@@ -1865,7 +1980,7 @@ function VirtualDataTableComponent({ data, loading = false, columns, onRowClick,
|
|
|
1865
1980
|
show: data.length === 0, // 최초 로딩에만 배경 표시
|
|
1866
1981
|
opacity: 0.8,
|
|
1867
1982
|
} })) }))] }));
|
|
1868
|
-
return showPaper ? (jsxRuntime.jsx(material.Paper, { className: "grow",
|
|
1983
|
+
return showPaper ? (jsxRuntime.jsx(material.Paper, { className: "grow", elevation: 1, sx: {
|
|
1869
1984
|
padding: 0,
|
|
1870
1985
|
paddingLeft: paddingX,
|
|
1871
1986
|
height: "100%",
|