Skip to content

Commit

Permalink
Merge branch 'master' of github.com-rtivital:mantinedev/mantine
Browse files Browse the repository at this point in the history
  • Loading branch information
rtivital committed Apr 11, 2024
2 parents a392d91 + 77692de commit bef8a16
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
5 changes: 5 additions & 0 deletions packages/@mantine/core/src/components/PinInput/PinInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ export interface PinInputProps

/** Props passed down to the hidden input */
hiddenInputProps?: React.ComponentPropsWithoutRef<'input'>;

/** Assigns ref of the root element */
rootRef?: React.ForwardedRef<HTMLDivElement>;
}

export type PinInputFactory = Factory<{
Expand Down Expand Up @@ -174,6 +177,7 @@ export const PinInput = factory<PinInputFactory>((props, ref) => {
vars,
id,
hiddenInputProps,
rootRef,
...others
} = useProps('PinInput', defaultProps, props);

Expand Down Expand Up @@ -364,6 +368,7 @@ export const PinInput = factory<PinInputFactory>((props, ref) => {
<Group
{...others}
{...getStyles('root')}
ref={rootRef}
role="group"
id={uuid}
gap={gap}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
height: var(--scrollarea-scrollbar-size);
flex-direction: column;
bottom: 0;
inset-inline-end: 0;
inset-inline-start: var(--sa-corner-height);
inset-inline-start: 0;
inset-inline-end: var(--sa-corner-width);
}
}

Expand Down
13 changes: 4 additions & 9 deletions packages/@mantine/core/src/components/ScrollArea/ScrollArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,10 @@ export const ScrollArea = factory<ScrollAreaFactory>((_props, ref) => {
ref={viewportRef}
data-offset-scrollbars={offsetScrollbars === true ? 'xy' : offsetScrollbars || undefined}
data-scrollbars={scrollbars || undefined}
onScroll={
typeof onScrollPositionChange === 'function'
? ({ currentTarget }) =>
onScrollPositionChange({
x: currentTarget.scrollLeft,
y: currentTarget.scrollTop,
})
: undefined
}
onScroll={(e) => {
viewportProps?.onScroll?.(e);
onScrollPositionChange?.({ x: e.currentTarget.scrollLeft, y: e.currentTarget.scrollTop });
}}
>
{children}
</ScrollAreaViewport>
Expand Down

0 comments on commit bef8a16

Please sign in to comment.