File tree Expand file tree Collapse file tree 2 files changed +15
-34
lines changed
packages/react-native-bottom-tabs/src Expand file tree Collapse file tree 2 files changed +15
-34
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11import React from 'react' ;
22import type { TabViewItems } from './TabViewNativeComponent' ;
3- import Screen from './Screen' ;
43import {
54 type ColorValue ,
65 Image ,
@@ -16,6 +15,7 @@ import type { ImageSource } from 'react-native/Libraries/Image/ImageSource';
1615import NativeTabView from './TabViewNativeComponent' ;
1716import useLatestCallback from 'use-latest-callback' ;
1817import type { BaseRoute , NavigationState } from './types' ;
18+ import DelayedFreeze from './DelayedFreeze' ;
1919
2020const isAppleSymbol = ( icon : any ) : icon is { sfSymbol : string } =>
2121 icon ?. sfSymbol ;
@@ -330,20 +330,26 @@ const TabView = <Route extends BaseRoute>({
330330 const freeze = ! focused ? getFreezeOnBlur ( { route } ) : false ;
331331
332332 return (
333- < Screen
333+ < View
334334 key = { route . key }
335- freeze = { ! ! freeze }
336- focused = { focused }
337335 style = { [
338336 styles . screen ,
339337 renderCustomTabBar ? styles . fullWidth : measuredDimensions ,
340338 ] }
339+ collapsable = { false }
340+ pointerEvents = { focused ? 'auto' : 'none' }
341+ accessibilityElementsHidden = { ! focused }
342+ importantForAccessibility = {
343+ focused ? 'auto' : 'no-hide-descendants'
344+ }
341345 >
342- { renderScene ( {
343- route,
344- jumpTo,
345- } ) }
346- </ Screen >
346+ < DelayedFreeze freeze = { ! ! freeze } >
347+ { renderScene ( {
348+ route,
349+ jumpTo,
350+ } ) }
351+ </ DelayedFreeze >
352+ </ View >
347353 ) ;
348354 } ) }
349355 </ NativeTabView >
You can’t perform that action at this time.
0 commit comments