import type { ChangeEvent, FocusEvent } from 'react'; import type { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils'; import { rangeSpec } from '@rjsf/utils'; import FormRange from 'react-bootstrap/FormRange'; export default function RangeWidget( props: WidgetProps, ) { const { id, value, disabled, onChange, onBlur, onFocus, schema } = props; const handleChange = ({ target: { value: newValue } }: ChangeEvent) => onChange(newValue); const handleBlur = ({ target: { value: newValue } }: FocusEvent) => onBlur(id, newValue); const handleFocus = ({ target: { value: newValue } }: FocusEvent) => onFocus(id, newValue); const rangeProps = { value, id, name: id, disabled, onChange: handleChange, onBlur: handleBlur, onFocus: handleFocus, ...rangeSpec(schema), }; return ( <> {value} ); }