Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions src/UI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ const RemoveScroll: RemoveScrollUIType = React.forwardRef<HTMLElement, IRemoveSc
forwardProps,
children,
className,
removeScrollBar,
enabled,
removeScrollBar = true,
enabled = true,
shards,
sideCar,
noRelative,
noIsolation,
inert,
inert = false,
allowPinchZoom,
as: Container = 'div',
gapMode,
Expand Down Expand Up @@ -86,12 +86,6 @@ const RemoveScroll: RemoveScrollUIType = React.forwardRef<HTMLElement, IRemoveSc
);
}) as any;

RemoveScroll.defaultProps = {
enabled: true,
removeScrollBar: true,
inert: false,
};

RemoveScroll.classNames = {
fullWidth: fullWidthClassName,
zeroRight: zeroRightClassName,
Expand Down
4 changes: 2 additions & 2 deletions src/handleScroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ const getDirectionFactor = (axis: Axis, direction: string | null) =>
export const handleScroll = (
axis: Axis,
endTarget: HTMLElement,
event: any,
event: WheelEvent | TouchEvent,
sourceDelta: number,
noOverscroll: boolean
) => {
): boolean => {
const directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
const delta = directionFactor * sourceDelta;

Expand Down