Skip to content

Commit

Permalink
[Slider] Remove unnecessary data-focusvisible attribute (#36091)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeeshanTamboli committed Feb 21, 2023
1 parent cba0019 commit 464fb9e
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const Thumb = React.forwardRef(function Thumb(
props: SliderUnstyledThumbSlotProps,
ref: React.ForwardedRef<HTMLDivElement>,
) {
const { 'data-index': index, 'data-focusvisible': focusVisible, ownerState, ...other } = props;
const { 'data-index': index, ownerState, ...other } = props;
return <div data-track={ownerState.track} {...other} ref={ref} />;
});

Expand Down
1 change: 0 additions & 1 deletion packages/mui-base/src/SliderUnstyled/SliderUnstyled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ const SliderUnstyled = React.forwardRef(function SliderUnstyled<
<Thumb
key={index}
data-index={index}
data-focusvisible={focusedThumbIndex === index}
{...thumbProps}
className={clsx(classes.thumb, thumbProps.className, {
[classes.active]: active === index,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ export type SliderUnstyledRailSlotProps = {

export type SliderUnstyledThumbSlotProps = UseSliderThumbSlotProps & {
'data-index': number;
'data-focusvisible': boolean;
children: React.ReactNode;
className?: string;
ownerState: SliderUnstyledOwnerState;
Expand Down
1 change: 0 additions & 1 deletion packages/mui-material/src/Slider/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,6 @@ const Slider = React.forwardRef(function Slider(inputProps, ref) {
>
<ThumbSlot
data-index={index}
data-focusvisible={focusedThumbIndex === index}
{...thumbProps}
className={clsx(classes.thumb, thumbProps.className, {
[classes.active]: active === index,
Expand Down

0 comments on commit 464fb9e

Please sign in to comment.