@ehfuse/mui-virtual-data-table 1.0.4 → 1.0.5

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/dist/index.esm.js CHANGED
@@ -421,7 +421,7 @@ const DEFAULT_TRACK_CONFIG = {};
421
421
  const DEFAULT_ARROWS_CONFIG = {};
422
422
  const DEFAULT_DRAG_SCROLL_CONFIG = {};
423
423
  const DEFAULT_AUTO_HIDE_CONFIG = {};
424
- const OverlayScrollbar = forwardRef(({ className = "", style = {}, children, onScroll,
424
+ const OverlayScrollbar = forwardRef(({ className = "", style = {}, containerStyle = {}, contentStyle = {}, children, onScroll,
425
425
  // 그룹화된 설정 객체들
426
426
  thumb = DEFAULT_THUMB_CONFIG, track = DEFAULT_TRACK_CONFIG, arrows = DEFAULT_ARROWS_CONFIG, dragScroll = DEFAULT_DRAG_SCROLL_CONFIG, autoHide = DEFAULT_AUTO_HIDE_CONFIG,
427
427
  // 기타 설정들
@@ -1169,24 +1169,11 @@ showScrollbar = true, }, ref) => {
1169
1169
  }
1170
1170
  };
1171
1171
  }, []);
1172
- return (jsxs("div", { className: `overlay-scrollbar-wrapper ${className}`, style: Object.assign({ display: "flex", flexDirection: "column", position: "relative", minHeight: 0, height: "100%", flex: "1 1 0%" }, style), children: [jsx("div", { ref: containerRef, className: "overlay-scrollbar-container", tabIndex: -1, onMouseDown: handleDragScrollStart, style: {
1173
- width: "100%", // 명시적 너비 설정
1174
- height: "100%", // 부모의 전체 높이 사용
1175
- flex: "1 1 auto", // flex item으로 설정하여 높이를 자동으로 계산
1176
- minHeight: 0, // 최소 높이 보장
1177
- overflow: "auto", // 네이티브 스크롤 기능 유지
1172
+ return (jsxs("div", { className: `overlay-scrollbar-wrapper ${className}`, style: Object.assign({ display: "flex", flexDirection: "column", position: "relative", minHeight: 0, height: "100%", flex: "1 1 0%" }, style), children: [jsx("div", { ref: containerRef, className: "overlay-scrollbar-container", tabIndex: -1, onMouseDown: handleDragScrollStart, style: Object.assign({ width: "100%", height: "100%", flex: "1 1 auto", minHeight: 0, overflow: "auto",
1178
1173
  // 브라우저 기본 스크롤바만 숨기기
1179
- scrollbarWidth: "none", // Firefox
1180
- msOverflowStyle: "none", // IE/Edge
1174
+ scrollbarWidth: "none", msOverflowStyle: "none",
1181
1175
  // 키보드 포커스 스타일 (접근성)
1182
- outline: "none", // 기본 아웃라인 제거
1183
- userSelect: isDragScrolling ? "none" : "auto", // 드래그 중 텍스트 선택 방지
1184
- }, children: jsx("div", { ref: contentRef, className: "overlay-scrollbar-content", style: {
1185
- height: "100%", // min-height 대신 height 사용
1186
- minHeight: 0, // flex shrink 허용
1187
- display: "flex", // flex 컨테이너로 설정
1188
- flexDirection: "column", // 세로 방향 정렬
1189
- }, children: children }) }), showScrollbar && hasScrollableContent && (jsxs("div", { ref: scrollbarRef, className: "overlay-scrollbar-track", onMouseEnter: () => {
1176
+ outline: "none", userSelect: isDragScrolling ? "none" : "auto" }, containerStyle), children: jsx("div", { ref: contentRef, className: "overlay-scrollbar-content", style: Object.assign({ minHeight: 0, display: "flex", flexDirection: "column" }, contentStyle), children: children }) }), showScrollbar && hasScrollableContent && (jsxs("div", { ref: scrollbarRef, className: "overlay-scrollbar-track", onMouseEnter: () => {
1190
1177
  clearHideTimer();
1191
1178
  setScrollbarVisible(true);
1192
1179
  }, onMouseLeave: () => {
@@ -1324,7 +1311,7 @@ function VirtualDataTableComponent({ data, loading = false, columns, onRowClick,
1324
1311
  // 각 테이블 인스턴스별로 Scroller 컴포넌트 생성 (scrollbars, paddingX를 초기값으로 고정)
1325
1312
  const VirtuosoScroller = useMemo(() => forwardRef((props, ref) => {
1326
1313
  const scrollContainerRef = useRef(null);
1327
- return (jsx(OverlayScrollbar, { track: OVERLAY_SCROLLBAR_TRACK_CONFIG, ...scrollbars, children: jsx(TableContainer, { component: Box, ...props, ref: (node) => {
1314
+ return (jsx(OverlayScrollbar, { track: OVERLAY_SCROLLBAR_TRACK_CONFIG, contentStyle: { height: "100%" }, ...scrollbars, children: jsx(TableContainer, { component: Box, ...props, ref: (node) => {
1328
1315
  scrollContainerRef.current =
1329
1316
  node;
1330
1317
  if (typeof ref === "function") {