when performing an update on the content, this does not reflect for the listing
See original GitHub issueI am updating the content of DraggableFlatList, in the data attribute via redux, but I noticed that when updating in the variable that is defined in the date, it does not update the listing, this only occurs when the drag drop
Example with DraggableFlatList:
code:
<DraggableFlatList
data={data}
renderItem={this.renderItem}
keyExtractor={item => `key-${item.interno}`}
scrollPercent={5}
onMoveEnd={({ data }) => this.props.ordenacaoActions.setOrderUnidadesRequest({ data })}
contentContainerStyle={{ marginHorizontal: metrics.baseMargin }}
ItemSeparatorComponent={() => <View style={styles.separator} />}
/>
Example without DraggableFlatList and use original FlatList
code:
<FlatList
data={data}
renderItem={this.renderItem}
keyExtractor={item => `key-${item.interno}`}
scrollPercent={5}
onMoveEnd={({ data }) => this.props.ordenacaoActions.setOrderUnidadesRequest({ data })}
contentContainerStyle={{ marginHorizontal: metrics.baseMargin }}
ItemSeparatorComponent={() => <View style={styles.separator} />}
/>
I believe the lib, is not considering in your shouldComponentUpdate when there is update in the input values, or something of the genre …
Am I correct about this procedure?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Update a table of contents - Microsoft Support
Go to References > Update Table. Select one of the following: Update page numbers only This only updates the pages that the headings...
Read more >WordPress Changes Not Showing? 3 Methods to Fix It Right ...
When WordPress is not showing changes right away, it is most likely still displaying a cached version. Learn three ways to fix this...
Read more >Why does my GitHub page not update its content?
I reflect my changes in my deployed GitHub repository after committing locally, by renaming my gh-pages branch to master ...
Read more >WordPress Changes Not Showing? Here's How to Fix ... - Kinsta
Having issues with WordPress changes not showing on your site? It's usually problems with caching - we'll show you how to fix the...
Read more >Control when app changes are published with managed ...
On the left menu, select Publishing overview. · Check that all your changes have been approved and are listed under “Changes ready to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I solved this using @bomei’s suggestion. Passing the prop
extraData
with the nested data that can change resolved the issue for me. Check out the docs on this prop here: https://facebook.github.io/react-native/docs/flatlist#extradataIt might be clearer if we added a link in the readme to all the
FlatList
props you can pass so we avoid confusion in the future: https://facebook.github.io/react-native/docs/flatlist#propsFlatList
is pureComponent, you should addextraData={data}
or something similar in your code.