@servantcdh/ez-planet-labeling 1.0.6 → 1.0.8

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.
Files changed (2) hide show
  1. package/dist/index.js +15 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3589,7 +3589,7 @@ const LIB_AUTHOR = "최동호";
3589
3589
  const LIB_CONTACT = "servantcdh@naver.com";
3590
3590
  const __EZ_PLANET_META__ = Object.freeze({
3591
3591
  name: LIB_NAME,
3592
- version: "1.0.6",
3592
+ version: "1.0.8",
3593
3593
  author: LIB_AUTHOR,
3594
3594
  contact: LIB_CONTACT,
3595
3595
  license: "Proprietary — See LICENSE"
@@ -16461,20 +16461,26 @@ function WorkspaceNavigationDetailTable({
16461
16461
  const theadRef = useRef(null);
16462
16462
  const theadHeightRef = useRef(24);
16463
16463
  const [scrollMargin, setScrollMargin] = useState(24);
16464
+ const setupRef = useRef(false);
16464
16465
  useEffect(() => {
16465
- const wrapper = wrapperRef.current;
16466
+ if (setupRef.current) return;
16467
+ const wrapper = wrapperRef.current ?? document.querySelector(
16468
+ ".workspace-navigation-table__detail-wrapper"
16469
+ );
16466
16470
  if (!wrapper) return;
16471
+ wrapperRef.current = wrapper;
16467
16472
  const applyMaxHeight = () => {
16468
16473
  const wrapperTop = wrapper.getBoundingClientRect().top;
16469
16474
  const available = Math.max(window.innerHeight - wrapperTop - 8, 200);
16470
- wrapper.style.maxHeight = `${available}px`;
16471
- wrapper.style.overflowY = "auto";
16475
+ wrapper.style.setProperty("max-height", `${available}px`, "important");
16476
+ wrapper.style.setProperty("overflow-y", "auto", "important");
16472
16477
  };
16473
16478
  applyMaxHeight();
16474
16479
  if (theadRef.current) {
16475
16480
  theadHeightRef.current = theadRef.current.getBoundingClientRect().height;
16476
16481
  }
16477
16482
  setScrollMargin(theadHeightRef.current);
16483
+ setupRef.current = true;
16478
16484
  const ro = new ResizeObserver(applyMaxHeight);
16479
16485
  ro.observe(wrapper);
16480
16486
  let ancestor = wrapper.parentElement;
@@ -16482,8 +16488,11 @@ function WorkspaceNavigationDetailTable({
16482
16488
  ro.observe(ancestor);
16483
16489
  ancestor = ancestor.parentElement;
16484
16490
  }
16485
- return () => ro.disconnect();
16486
- }, []);
16491
+ return () => {
16492
+ ro.disconnect();
16493
+ setupRef.current = false;
16494
+ };
16495
+ });
16487
16496
  const rowVirtualizer = useVirtualizer({
16488
16497
  count: rows.length,
16489
16498
  getScrollElement: () => wrapperRef.current,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servantcdh/ez-planet-labeling",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",