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