Skip to content

Commit fab8fe0

Browse files
authored
Merge pull request #1865 from wix/fix/AgendaList_setDisabled_updates
AgendaList - fix for 'setDisabled' not updating
2 parents 3ce09eb + 1809edd commit fab8fe0

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)