Skip to content

FlatList inverted prop ordering of elements causes copy/paste issues #30383

Open

Description

@puneetlath

Description

When the inverted prop is applied to FlatList the elements remain in the order given and are reversed via styling rather than by reversing the order in which they are rendered. This makes it so that, for example, if react-native-web is used, when the list elements are copied, they end up pasting in reverse order.

React Native version:

0.63.3

Steps To Reproduce

  1. Create a list using FlatList
  2. Apply the inverted prop
  3. Note the order of some list items and copy them
  4. Paste them and note that the order is backwards from what was displayed

Expected Results

I would expect that when pasted the list would retain the order that is shown on the screen.

Snack, code example, screenshot, or link to a repository:

https://codesandbox.io/s/cold-wave-grzpj?file=/src/App.js

Activity

  1. anthony-hull commented on Feb 4, 2021

    @anthony-hull

    #30373 Linking in this other issue which is another symptom of how the inversion is carried out.

  2. necolas commented on Mar 27, 2023

    @necolas

    FYI a fix for this was submitted to React Native for Web by @azimgd

    necolas/react-native-web#2151

    ...and it looks like it should work for React Native once this associated bug is also fixed.

    react/yoga#866 (comment)

  3. github-actions commented on Sep 24, 2023

    @github-actions

    This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

  4. added
    Stale
    on Sep 24, 2023
  5. github-actions commented on Oct 1, 2023

    @github-actions

    This issue was closed because it has been stalled for 7 days with no activity.

  6. reopened this on Oct 1, 2023
  7. removed
    Stale
    on Oct 2, 2023
  8. added
    Never gets stale
    on Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: FlatListNeeds: Triage 🔍Never gets stale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions