-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Closed
Closed
Copy link
Labels
Ran CommandsOne of our bots successfully processed a command.One of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
I remember using FlatList
when it didn't have this check:
invariant(
nextProps.numColumns === this.props.numColumns,
'Changing numColumns on the fly is not supported. Change the key prop on FlatList when ' +
'changing the number of columns to force a fresh render of the component.',
);
So basically I wrapped the FlatList
in a View
with onLayout
prop, and when the width of screen changes (from portrait <-> layout) I would change the number of columns (and some other calculations). This is not allowed now, so what it forces me to do is changing the key
prop of the FlatList
... This renders a completely new list, losing the scroll position and with a big delay even in production.
Any workarounds, thoughts ?
satya164, nimeetshah0, justinsherwood-archive, wilomgfx, danmaq and 3 more
Metadata
Metadata
Assignees
Labels
Ran CommandsOne of our bots successfully processed a command.One of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.