react-native-sortable-grid
react-native-sortable-grid copied to clipboard
Props not updating inside <SortableGrid>
Hi @ollija, I have several 'cell's inside this sortable grid. Some cells have props connected to a remote API. Apparently the cells that are inside the sortable_grid don't update and those which are outside do update. My main question is: Do props inside <SortableGrid> are updatable?
<SortableGrid>
<View style={styles.defaultCell} key={key_item}>
<Text style={styles.cellTitle}>Availability</Text>
<Text style={styles.cellValue}>{this.props.activity}%</Text>. //This doesn't update
</View>
</SortableGrid>
<View style={styles.defaultCell} key={key_item}>
<Text style={styles.cellTitle}>Availability</Text>
<Text style={styles.cellValue}>{this.props.activity}%</Text>. //This does get updated
</View>
Try install dependency from github repository, not from npm.
@krhovsky that worked for me, thanks!
npm i react-native-sortable-grid@https://github.com/ollija/react-native-sortable-grid --save
This still does not appear to be working for me. Trying to dynamically change the itemsPerRow with a button that changes local state. Are we sure this is still fixed?
npm i react-native-sortable-grid@https://github.com/ollija/react-native-sortable-grid --save
solved the problem, but resulted in another, the movement behaves differently than expected
This still does not appear to be working for me. Trying to dynamically change the itemsPerRow with a button that changes local state. Are we sure this is still fixed?
I have the same problem, managed to solve?