Skip to content

Incorrect position when using in FlashList #283

@tmiyasa

Description

@tmiyasa

When using FlashList, major library for high performance list, and using Menu in reneder() function, the popup displays at incorrect position (display near the first item of the list).
https://docs.expo.dev/versions/latest/sdk/flash-list/

It can be reproduced just by replacing FlatList by FlashList in the exmaple.
https://github.com/instea/react-native-popup-menu/blob/master/examples/InFlatListExample.js

    return (
      <MenuProvider style={styles.container}>
        <FlashList
          data={data}
          renderItem={({ item }) => (
            <Menu onSelect={(value) => Alert.alert(value)}>
              <MenuTrigger text={"Select option " + item.value} />
              <MenuOptions>
                <MenuOption value="A" text="A" />
                <MenuOption value="B" text="B" />
                <MenuOption value="C" text="C" />
              </MenuOptions>
            </Menu>
          )}
          style={{ height: 200 }}
        />
      </MenuProvider>

When clicking item 30, popup appears at the top.
image

FlashList is one of the major RN library for list, so I'd appreciate if you could handle this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions