forked from vergnet/application-amicale
Further performance improvements
This commit is contained in:
parent
3d0e03cb9d
commit
2dab27de22
1 changed files with 5 additions and 2 deletions
|
@ -53,6 +53,9 @@ class GroupListAccordion extends React.Component<Props> {
|
||||||
return displayData;
|
return displayData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
itemLayout = (data, index) => ({length: LIST_ITEM_HEIGHT, offset: LIST_ITEM_HEIGHT * index, index});
|
||||||
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const item = this.props.item;
|
const item = this.props.item;
|
||||||
return (
|
return (
|
||||||
|
@ -82,8 +85,8 @@ class GroupListAccordion extends React.Component<Props> {
|
||||||
keyExtractor={this.keyExtractor}
|
keyExtractor={this.keyExtractor}
|
||||||
listKey={item.id.toString()}
|
listKey={item.id.toString()}
|
||||||
// Performance props, see https://reactnative.dev/docs/optimizing-flatlist-configuration
|
// Performance props, see https://reactnative.dev/docs/optimizing-flatlist-configuration
|
||||||
// getItemLayout={this.itemLayout} // Broken with search
|
getItemLayout={this.itemLayout}
|
||||||
// removeClippedSubviews={true}
|
removeClippedSubviews={true}
|
||||||
/>
|
/>
|
||||||
</AnimatedAccordion>
|
</AnimatedAccordion>
|
||||||
</View>
|
</View>
|
||||||
|
|
Loading…
Reference in a new issue