Skip to content

Commit c5f2040

Browse files
committed
WIP
1 parent a0cb5dc commit c5f2040

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

packages/react/src/field/control/useFieldControlValidation.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export function useFieldControlValidation() {
5656
const commitValidation = useEventCallback(async (value: unknown, revalidate = false) => {
5757
const element = inputRef.current;
5858
if (!element) {
59+
console.log('return no element');
5960
return;
6061
}
6162

packages/react/src/slider/root/SliderRoot.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,10 @@ export const SliderRoot = React.forwardRef(function SliderRoot<
115115

116116
const sliderRef = React.useRef<HTMLElement>(null);
117117
const controlRef = React.useRef<HTMLElement>(null);
118-
const hiddenInputRef = React.useRef<HTMLInputElement>(null);
119118
const thumbRefs = React.useRef<(HTMLElement | null)[]>([]);
120119
const lastChangedValueRef = React.useRef<number | readonly number[] | null>(null);
121120
const formatOptionsRef = useLatestRef(format);
122-
const mergedInputRef = useForkRef(inputRefProp, hiddenInputRef, inputValidationRef);
121+
// const mergedInputRef = useForkRef(inputRefProp, inputValidationRef);
123122

124123
// We can't use the :active browser pseudo-classes.
125124
// - The active state isn't triggered when clicking on the rail.
@@ -347,13 +346,15 @@ export const SliderRoot = React.forwardRef(function SliderRoot<
347346
<CompositeList elementsRef={thumbRefs} onMapChange={setThumbMap}>
348347
{element}
349348
<input
350-
type="hidden"
351349
{...getInputValidationProps({
350+
// type: 'hidden',
352351
disabled,
353352
name,
354-
ref: mergedInputRef,
353+
ref: inputValidationRef,
355354
value: serializedValue,
356355
style: visuallyHidden,
356+
tabIndex: -1,
357+
'aria-hidden': true,
357358
})}
358359
/>
359360
</CompositeList>

0 commit comments

Comments
 (0)