@tactics/toddle-styleguide 5.4.46 → 5.4.47
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/package.json +1 -1
- package/src/components/molecules/swipe/swipe.component.native.tsx +1 -0
- package/src/components/molecules/swipe/swipe.styles.d.ts +1 -0
- package/src/components/molecules/swipe/swipe.styles.js +1 -0
- package/src/components/templates/popover-action/popover-action.component.tsx +13 -9
package/package.json
CHANGED
|
@@ -49,16 +49,20 @@ export const PopOverAction = ({
|
|
|
49
49
|
index: number,
|
|
50
50
|
layout: LayoutChangeEvent['nativeEvent']['layout']
|
|
51
51
|
) => {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
// Ignore zero-height layouts which can occur before content renders,
|
|
53
|
+
// otherwise the sheet may collapse and appear to lose content.
|
|
54
|
+
if (layout?.height && layout.height > 0) {
|
|
55
|
+
setChildDimensions((prev) => {
|
|
56
|
+
const updated = [...prev];
|
|
57
|
+
updated[index] = layout;
|
|
58
|
+
return updated;
|
|
59
|
+
});
|
|
57
60
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
// Ensure element size is known for the currently visible child so the animation can open
|
|
62
|
+
// even if Swipe never emits onIndexChange (e.g., only one child or Swipe not implemented yet).
|
|
63
|
+
if (index === currentChildIndex) {
|
|
64
|
+
setElementSize({ width: layout.width, height: layout.height });
|
|
65
|
+
}
|
|
62
66
|
}
|
|
63
67
|
};
|
|
64
68
|
|