elseware-ui 2.29.0 → 2.29.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/dist/index.mjs CHANGED
@@ -17558,13 +17558,24 @@ function EUIDevLayout({
17558
17558
  );
17559
17559
  }
17560
17560
  var EUIDevLayout_default = EUIDevLayout;
17561
- function ScrollToTop({ trigger, behavior = "smooth" }) {
17561
+ function ScrollToTop({
17562
+ trigger,
17563
+ behavior = "smooth",
17564
+ target
17565
+ }) {
17562
17566
  useEffect(() => {
17567
+ if (target) {
17568
+ target.scrollTo({
17569
+ top: 0,
17570
+ behavior
17571
+ });
17572
+ return;
17573
+ }
17563
17574
  window.scrollTo({
17564
17575
  top: 0,
17565
17576
  behavior
17566
17577
  });
17567
- }, [trigger]);
17578
+ }, [trigger, target]);
17568
17579
  return null;
17569
17580
  }
17570
17581
  var ScrollToTop_default = ScrollToTop;