File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
src/components/tabController Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -206,9 +206,9 @@ const TabBar = (props: Props) => {
206
206
iconColor = { iconColor }
207
207
selectedIconColor = { selectedIconColor }
208
208
activeBackgroundColor = { activeBackgroundColor }
209
- key = { item . label }
210
209
{ ...item }
211
210
{ ...context }
211
+ key = { `${ index } _${ item . label } ` }
212
212
index = { index }
213
213
onLayout = { onItemLayout }
214
214
/>
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ export default function TabBarItem({
149
149
const onLayout = useCallback ( ( event : LayoutChangeEvent ) => {
150
150
const { width} = event . nativeEvent . layout ;
151
151
152
- if ( ! props . width && itemRef ?. current ) {
152
+ if ( ! itemWidth . current && itemRef ?. current ) {
153
153
itemWidth . current = width ;
154
154
// @ts -ignore
155
155
itemRef . current ?. setNativeProps ( { style : { width, paddingHorizontal : null , flex : null } } ) ;
You can’t perform that action at this time.
0 commit comments