@marcoschwartz/lite-ui 0.27.6 → 0.27.7
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 +8 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3820,14 +3820,18 @@ var SegmentedControl = ({
|
|
|
3820
3820
|
}
|
|
3821
3821
|
}, [activeIndex, orientation, transitionDuration]);
|
|
3822
3822
|
(0, import_react20.useLayoutEffect)(() => {
|
|
3823
|
-
updateIndicator(false);
|
|
3824
3823
|
setInitialized(true);
|
|
3825
3824
|
}, []);
|
|
3825
|
+
(0, import_react20.useLayoutEffect)(() => {
|
|
3826
|
+
if (initialized && indicatorRef.current) {
|
|
3827
|
+
updateIndicator(false);
|
|
3828
|
+
}
|
|
3829
|
+
}, [initialized]);
|
|
3826
3830
|
(0, import_react20.useEffect)(() => {
|
|
3827
|
-
if (initialized) {
|
|
3831
|
+
if (initialized && indicatorRef.current) {
|
|
3828
3832
|
updateIndicator(true);
|
|
3829
3833
|
}
|
|
3830
|
-
}, [currentValue,
|
|
3834
|
+
}, [currentValue, updateIndicator]);
|
|
3831
3835
|
(0, import_react20.useEffect)(() => {
|
|
3832
3836
|
const handleResize = () => updateIndicator(false);
|
|
3833
3837
|
window.addEventListener("resize", handleResize);
|
|
@@ -3887,7 +3891,7 @@ var SegmentedControl = ({
|
|
|
3887
3891
|
"aria-label": ariaLabel || "Segmented control",
|
|
3888
3892
|
className: containerClasses,
|
|
3889
3893
|
children: [
|
|
3890
|
-
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
3894
|
+
initialized && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
3891
3895
|
"div",
|
|
3892
3896
|
{
|
|
3893
3897
|
ref: indicatorRef,
|