react-native-collapsible-tab-view icon indicating copy to clipboard operation
react-native-collapsible-tab-view copied to clipboard

Header not moving after pressing tabs or swiping on RTL layout

Open hossein-zare opened this issue 3 years ago • 4 comments

Current behavior

Everything is fine when i scroll up & down, The header is collapsible until i press tabs or swipe, The header doesn't move anymore.

My app is RTL for your information.

Expected behaviour

The header should always be collapsible.

Code sample

const HEIGHT = 250;

const Header = useCallback(() => (
  <View style={{
    backgroundColor: "red",
    width: "100%",
    height: HEIGHT
  }} />
), []);



<Tabs.Container
  renderHeader={Header}
  headerHeight={HEIGHT}>
    <Tabs.Tab name="A">
      <Tabs.ScrollView>
        <View style={[styles.box, styles.boxA]} />
        <View style={[styles.box, styles.boxB]} />
        <View style={[styles.box, styles.boxA]} />
        <View style={[styles.box, styles.boxB]} />
      </Tabs.ScrollView>
    </Tabs.Tab>

    <Tabs.Tab name="B">
      <Tabs.ScrollView>
        <View style={[styles.box, styles.boxA]} />
        <View style={[styles.box, styles.boxB]} />
        <View style={[styles.box, styles.boxA]} />
        <View style={[styles.box, styles.boxB]} />
      </Tabs.ScrollView>
    </Tabs.Tab>
</Tabs.Container>

Screenshots (if applicable)

Untitled

package.json

"react-native": "0.64.1",
"react-native-collapsible-tab-view": "4.2.0",
"react-native-gesture-handler": "^1.10.3",
"react-native-reanimated": "2.0.0",

hossein-zare avatar Jun 06 '21 13:06 hossein-zare

If you switch to LTR does it work properly?

andreialecu avatar Jun 06 '21 16:06 andreialecu

@andreialecu Yes

hossein-zare avatar Jun 06 '21 17:06 hossein-zare

@hossein-zare are you able to indication blue strip when change the tab in RTL? if yes do you pass any other props?

saurabh874 avatar Jun 07 '21 07:06 saurabh874

@saurabh874 No, it doesn't show the blue stripe at first. I think you need to create your own Tab Bar.

hossein-zare avatar Jun 07 '21 07:06 hossein-zare