Skip to content

Commit ca16129

Browse files
committed
Remove from Slider
1 parent 9cd7b2a commit ca16129

File tree

3 files changed

+1
-21
lines changed

3 files changed

+1
-21
lines changed

Diff for: docs/reference/generated/slider-root.json

-4
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,6 @@
6969
"default": "'horizontal'",
7070
"description": "The component orientation."
7171
},
72-
"inputRef": {
73-
"type": "React.Ref",
74-
"description": "The ref to the hidden input element."
75-
},
7672
"className": {
7773
"type": "string | (state) => string",
7874
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component’s state."

Diff for: packages/react/src/slider/root/SliderRoot.tsx

+1-16
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ const SliderRoot = React.forwardRef(function SliderRoot<Value extends number | r
4141
step = 1,
4242
tabIndex: externalTabIndex,
4343
value,
44-
inputRef,
4544
...otherProps
4645
} = props;
4746

@@ -109,9 +108,8 @@ const SliderRoot = React.forwardRef(function SliderRoot<Value extends number | r
109108
format,
110109
state,
111110
tabIndex: externalTabIndex ?? null,
112-
inputRef,
113111
}),
114-
[slider, format, state, externalTabIndex, inputRef],
112+
[slider, format, state, externalTabIndex],
115113
);
116114

117115
const { renderElement } = useComponentRenderer({
@@ -236,10 +234,6 @@ namespace SliderRoot {
236234
* **Warning**: This is a generic event not a change event.
237235
*/
238236
onValueCommitted?: (value: Value extends number ? number : Value, event: Event) => void;
239-
/**
240-
* The ref to the hidden input element.
241-
*/
242-
inputRef?: React.Ref<HTMLInputElement>;
243237
}
244238
}
245239

@@ -301,15 +295,6 @@ SliderRoot.propTypes /* remove-proptypes */ = {
301295
* @ignore
302296
*/
303297
id: PropTypes.string,
304-
/**
305-
* The ref to the hidden input element.
306-
*/
307-
inputRef: PropTypes.oneOfType([
308-
PropTypes.func,
309-
PropTypes.shape({
310-
current: PropTypes.object,
311-
}),
312-
]),
313298
/**
314299
* The granularity with which the slider can step through values when using Page Up/Page Down or Shift + Arrow Up/Arrow Down.
315300
* @default 10

Diff for: packages/react/src/slider/root/SliderRootContext.ts

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export interface SliderRootContext extends Omit<useSliderRoot.ReturnValue, 'getR
77
format?: Intl.NumberFormatOptions;
88
state: SliderRoot.State;
99
tabIndex: number | null;
10-
inputRef: React.Ref<HTMLInputElement> | undefined;
1110
}
1211

1312
export const SliderRootContext = React.createContext<SliderRootContext | undefined>(undefined);

0 commit comments

Comments
 (0)