Skip to content

Commit

Permalink
Remove onScroll prop from WVList
Browse files Browse the repository at this point in the history
  • Loading branch information
inokawa committed Jul 18, 2023
1 parent cc7c4c3 commit 77fe0d1
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/react/WVList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -104,7 +99,6 @@ export const WVList = ({
horizontal: horizontalProp,
element: Window = DefaultWindow,
itemElement = "div",
onScroll: onScrollProp,
onScrollStop: onScrollStopProp,
onRangeChange: onRangeChangeProp,
...windowAttrs
Expand All @@ -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);
Expand All @@ -130,8 +123,8 @@ export const WVList = ({
onScrollStop[refKey] && onScrollStop[refKey]();
}
},
(offset) => {
onScroll[refKey] && onScroll[refKey](offset);
() => {
// TODO remove
}
);

Expand Down

0 comments on commit 77fe0d1

Please sign in to comment.