You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Am currently using the AgendaList component to render some reservation items sectioned by day and I would like to know the current items visible on the screen.
Expected Behavior
onViewableItemsChanged is supposed to be called as soon as the items on the viewable space has changed.
Observed Behavior
onViewableItemsChanged is not getting called no matter where I scroll. The props passed: viewabilityConfig={{ viewAreaCoveragePercentThreshold: 80, itemVisiblePercentThreshold: 80, }} onViewableItemsChanged={({ viewableItems, changed }) => { Alert.alert('test!'); console.log('items change', viewableItems); console.log('Changed in this iteration', changed); }}
from the docs I can see this agendaList component extends sectionList. are some props just not actively supported? Im also getting no behavior from getItemCount prop.
Update:
I was able to note why this issue was occurring. the AgendaList makes use of sectionList's "onViewableItemsChanged" which pretty much was overriding the users callback. Perhaps add support to call the user defined "onViewableItemsChanged" as well as agendaLists
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Description
Am currently using the AgendaList component to render some reservation items sectioned by day and I would like to know the current items visible on the screen.
Expected Behavior
onViewableItemsChanged is supposed to be called as soon as the items on the viewable space has changed.
Observed Behavior
onViewableItemsChanged is not getting called no matter where I scroll. The props passed:
viewabilityConfig={{ viewAreaCoveragePercentThreshold: 80, itemVisiblePercentThreshold: 80, }} onViewableItemsChanged={({ viewableItems, changed }) => { Alert.alert('test!'); console.log('items change', viewableItems); console.log('Changed in this iteration', changed); }}
Environment
react-native-calendars@1.1283.0
react-native@0.66.1
Simulator: IOS 15; Android API 29
simplified code:
<CalendarProvider onDateChanged={this.onDateChanged} onMonthChange={this.onMonthChange} > <ExpandableCalendar // props /> )} <AgendaList sections={ITEMS} renderItem={this.renderItem} viewabilityConfig={{ viewAreaCoveragePercentThreshold: 80, itemVisiblePercentThreshold: 80, }} onViewableItemsChanged={({ viewableItems, changed }) => { Alert.alert('test!'); console.log('items change', viewableItems); console.log('Changed in this iteration', changed); }} /> </CalendarProvider>
from the docs I can see this agendaList component extends sectionList. are some props just not actively supported? Im also getting no behavior from getItemCount prop.
Update:
I was able to note why this issue was occurring. the AgendaList makes use of sectionList's "onViewableItemsChanged" which pretty much was overriding the users callback. Perhaps add support to call the user defined "onViewableItemsChanged" as well as agendaLists
The text was updated successfully, but these errors were encountered: