Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
puneetlath opened this issue Nov 13, 2020 · 4 comments
Open
Labels
Component: FlatList Needs: Triage 🔍 Never gets stale Prevent those issues and PRs from getting stale

Comments

@puneetlath
Copy link

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

@anthony-hull
Copy link

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

@necolas
Copy link
Contributor

necolas commented Mar 27, 2023

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.

facebook/yoga#866 (comment)

@github-actions
Copy link

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.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Sep 24, 2023
@github-actions
Copy link

github-actions bot commented Oct 1, 2023

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

@github-actions github-actions bot closed this as completed Oct 1, 2023
@necolas necolas reopened this Oct 1, 2023
@github-actions github-actions bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Oct 2, 2023
@cortinico cortinico added the Never gets stale Prevent those issues and PRs from getting stale label Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: FlatList Needs: Triage 🔍 Never gets stale Prevent those issues and PRs from getting stale
Projects
None yet
Development

No branches or pull requests

5 participants