Fixed proximo list sorting not working

Esse commit está contido em:
keplyx 2020-03-10 17:18:02 +01:00
commit 35948ddfba
2 arquivos alterados com 15 adições e 0 exclusões

Ver arquivo

@ -1,9 +1,23 @@
import * as React from 'react';
import {FlatList} from "react-native";
type Props = {
data: Array<Object>,
keyExtractor: Function,
renderItem: Function,
updateData: number,
}
/**
* This is a pure component, meaning it will only update if a shallow comparison of state and props is different.
* To force the component to update, change the value of updateData.
*/
export default class PureFlatList extends React.PureComponent<Props>{
static defaultProps = {
updateData: null,
};
render() {
return (
<FlatList

Ver arquivo

@ -318,6 +318,7 @@ class ProximoListScreen extends React.Component<Props, State> {
data={this.state.currentlyDisplayedData}
keyExtractor={this.keyExtractor}
renderItem={this.renderItem}
updateData={this.state.currentSortMode}
/>
</View>
);