maru_design2 2.17.0 → 2.17.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.17.1](https://github.com/42maru-ai/maru-design2/compare/v2.17.0...v2.17.1) (2024-10-17)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * :bug: Table - UPDATE init body scroll height ([10ee05d](https://github.com/42maru-ai/maru-design2/commit/10ee05d5d373237b4b09b36ec7ece35cacffec28))
9
+
3
10
  ## [2.17.0](https://github.com/42maru-ai/maru-design2/compare/v2.16.3...v2.17.0) (2024-10-16)
4
11
 
5
12
 
package/dist/index.js CHANGED
@@ -25041,14 +25041,15 @@ function Table(_a) {
25041
25041
  useEffect(function () {
25042
25042
  var tableWrapper = tableWrapperRef === null || tableWrapperRef === void 0 ? void 0 : tableWrapperRef.current;
25043
25043
  var bodyScrollWrapper = tableBodyScrollWrapperRef === null || tableBodyScrollWrapperRef === void 0 ? void 0 : tableBodyScrollWrapperRef.current;
25044
- if (tableWrapper && bodyScrollWrapper) {
25044
+ // 로딩이거나 데이터가 없을때 emptyBodyHeight 설정이 되어있어 초기 바디 높이 설정에 혼란을 주어 분기처리해둠
25045
+ if (tableWrapper && bodyScrollWrapper && (!loading || data.length)) {
25045
25046
  if (maxHeight) {
25046
25047
  // header height = 55
25047
25048
  bodyScrollWrapper.style.maxHeight = "".concat(maxHeight - 55, "px");
25048
25049
  }
25049
25050
  setBodyScrollWrapperInitHeight(bodyScrollWrapper.offsetHeight);
25050
25051
  }
25051
- }, [maxHeight]);
25052
+ }, [maxHeight, loading, data]);
25052
25053
  /**
25053
25054
  * 필터토글, 세로스크롤, 가로스크롤 여부에 따라 변화하는 가로, 높이의 크기를 ref로 직접 설정
25054
25055
  * - ref의 변화를 감지하지 못하므로 하나의 useEffect 안에서 세팅
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maru_design2",
3
- "version": "2.17.0",
3
+ "version": "2.17.1",
4
4
  "main": "./dist/index.js",
5
5
  "author": "zena-42maru",
6
6
  "license": "MIT",