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 1
1
import React from 'react' ;
2
2
import type { TabViewItems } from './TabViewNativeComponent' ;
3
- import Screen from './Screen' ;
4
3
import {
5
4
type ColorValue ,
6
5
Image ,
@@ -16,6 +15,7 @@ import type { ImageSource } from 'react-native/Libraries/Image/ImageSource';
16
15
import NativeTabView from './TabViewNativeComponent' ;
17
16
import useLatestCallback from 'use-latest-callback' ;
18
17
import type { BaseRoute , NavigationState } from './types' ;
18
+ import DelayedFreeze from './DelayedFreeze' ;
19
19
20
20
const isAppleSymbol = ( icon : any ) : icon is { sfSymbol : string } =>
21
21
icon ?. sfSymbol ;
@@ -330,20 +330,26 @@ const TabView = <Route extends BaseRoute>({
330
330
const freeze = ! focused ? getFreezeOnBlur ( { route } ) : false ;
331
331
332
332
return (
333
- < Screen
333
+ < View
334
334
key = { route . key }
335
- freeze = { ! ! freeze }
336
- focused = { focused }
337
335
style = { [
338
336
styles . screen ,
339
337
renderCustomTabBar ? styles . fullWidth : measuredDimensions ,
340
338
] }
339
+ collapsable = { false }
340
+ pointerEvents = { focused ? 'auto' : 'none' }
341
+ accessibilityElementsHidden = { ! focused }
342
+ importantForAccessibility = {
343
+ focused ? 'auto' : 'no-hide-descendants'
344
+ }
341
345
>
342
- { renderScene ( {
343
- route,
344
- jumpTo,
345
- } ) }
346
- </ Screen >
346
+ < DelayedFreeze freeze = { ! ! freeze } >
347
+ { renderScene ( {
348
+ route,
349
+ jumpTo,
350
+ } ) }
351
+ </ DelayedFreeze >
352
+ </ View >
347
353
) ;
348
354
} ) }
349
355
</ NativeTabView >
You can’t perform that action at this time.
0 commit comments