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