Skip to content

Commit 630bb80

Browse files
authored
fix: content not visible on js version (#848)
1 parent a5de9e2 commit 630bb80

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

js/SegmentedControl.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,20 @@ const SegmentedControl = ({
9393
selectedIndex={selectedIndex}
9494
/>
9595
)}
96+
{selectedIndex != null && segmentWidth ? (
97+
<Animated.View
98+
style={[
99+
styles.slider,
100+
{
101+
transform: [{translateX: animation}],
102+
width: segmentWidth - 4,
103+
zIndex: -1,
104+
backgroundColor:
105+
tintColor || (colorScheme === 'dark' ? '#636366' : 'white'),
106+
},
107+
]}
108+
/>
109+
) : null}
96110
<View style={styles.segmentsContainer}>
97111
{values &&
98112
values.map((value, index) => {
@@ -117,20 +131,6 @@ const SegmentedControl = ({
117131
);
118132
})}
119133
</View>
120-
{selectedIndex != null && segmentWidth ? (
121-
<Animated.View
122-
style={[
123-
styles.slider,
124-
{
125-
transform: [{translateX: animation}],
126-
width: segmentWidth - 4,
127-
zIndex: -1,
128-
backgroundColor:
129-
tintColor || (colorScheme === 'dark' ? '#636366' : 'white'),
130-
},
131-
]}
132-
/>
133-
) : null}
134134
</View>
135135
);
136136
};

0 commit comments

Comments
 (0)