Skip to content

Commit 1809edd

Browse files
committed
AgendaList - fix for 'setDosabled' not updating in 'onMomentumScroll' events
1 parent 3ce09eb commit 1809edd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/expandableCalendar/agendaList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,14 +199,14 @@ const AgendaList = (props: AgendaListProps) => {
199199
const _onMomentumScrollBegin = useCallback((event: NativeSyntheticEvent<NativeScrollEvent>) => {
200200
setDisabled?.(true);
201201
onMomentumScrollBegin?.(event);
202-
}, [onMomentumScrollBegin]);
202+
}, [onMomentumScrollBegin, setDisabled]);
203203

204204
const _onMomentumScrollEnd = useCallback((event: NativeSyntheticEvent<NativeScrollEvent>) => {
205205
// when list momentum ends AND when scrollToSection scroll ends
206206
sectionScroll.current = false;
207207
setDisabled?.(false);
208208
onMomentumScrollEnd?.(event);
209-
}, [onMomentumScrollEnd]);
209+
}, [onMomentumScrollEnd, setDisabled]);
210210

211211
const _onScrollToIndexFailed = useCallback((info: {index: number; highestMeasuredFrameIndex: number; averageItemLength: number}) => {
212212
if (onScrollToIndexFailed) {

0 commit comments

Comments
 (0)