From 77fe0d1c44fb9ff29c920cc20a47a06f566e918f Mon Sep 17 00:00:00 2001 From: inokawa <48897392+inokawa@users.noreply.github.com> Date: Wed, 19 Jul 2023 01:32:07 +0900 Subject: [PATCH] Remove onScroll prop from WVList --- src/react/WVList.tsx | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/react/WVList.tsx b/src/react/WVList.tsx index 3502dd300..1c50cb2c7 100644 --- a/src/react/WVList.tsx +++ b/src/react/WVList.tsx @@ -65,11 +65,6 @@ export interface WVListProps extends WindowComponentAttributes { * @defaultValue "div" */ itemElement?: CustomItemComponentOrElement; - /** - * Callback invoked whenever scroll offset changes. - * @param offset Current scrollTop or scrollLeft. - */ - onScroll?: (offset: number) => void; /** * Callback invoked when scrolling stops. */ @@ -104,7 +99,6 @@ export const WVList = ({ horizontal: horizontalProp, element: Window = DefaultWindow, itemElement = "div", - onScroll: onScrollProp, onScrollStop: onScrollStopProp, onRangeChange: onRangeChangeProp, ...windowAttrs @@ -113,7 +107,6 @@ export const WVList = ({ const elements = useMemo(() => flattenChildren(children), [children]); const count = elements.length; - const onScroll = useRefWithUpdate(onScrollProp); const onScrollStop = useRefWithUpdate(onScrollStopProp); const [scrolling, setScrolling] = useState(false); @@ -130,8 +123,8 @@ export const WVList = ({ onScrollStop[refKey] && onScrollStop[refKey](); } }, - (offset) => { - onScroll[refKey] && onScroll[refKey](offset); + () => { + // TODO remove } );