Skip to content

SegmentedControl with List on Android not working #3598

Open
@TweetyBoop1990

Description

@TweetyBoop1990

Description

When using SegmentedControl with an android device, the list in the segment can be scrolled but cannot be pressed.

Related to

  • Components
  • Demo
  • Docs
  • Typings

Steps to reproduce

1- Create a SegmentedControl
2- Set a Flatlist to appear for the segmented control index
3- Set a large number of items to appear in the flatlist or set the vertical padding to be big enough that some items do not appear above the fold upon rendering
4- On android, the items in the list below the fold are not pressable.

Expected behavior

The items below the fold should be pressable if set that way

Actual behavior

The items below the fold on render are not pressable

Code snippet

          <SegmentedControl
            margin-s2
            segments={[
              { label: t('compare.version') },
              { label: t('compare.plan') },
            ]}
            onChangeIndex={setSegmentIndex}
            preset="form"
          />
{segmentIndex === 0 && <Flatlist data={longlist} renderItem={({ item, index }) => { return (<Card marginV-s3 onPress={() => console.log('press me')}><Text>{item.title}</Text></Card>)}}

Environment

  • React Native version: 0.77.1
  • React Native UI Lib version: 7.38.1

Affected platforms

  • Android
  • iOS
  • Web

Metadata

Metadata

Assignees

No one assigned

    Labels

    buga bug in one of the components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions