score setting
This commit is contained in:
@@ -49,13 +49,16 @@ const Input: FC<Props> = (props: Props) => {
|
||||
setFormattedValue(formatted);
|
||||
|
||||
// ارسال مقدار خام به `onChange` والد
|
||||
props.onChange?.({
|
||||
const syntheticEvent = {
|
||||
...event,
|
||||
target: {
|
||||
...event.target,
|
||||
name: event.target.name,
|
||||
value: inputValue,
|
||||
},
|
||||
});
|
||||
} as React.ChangeEvent<HTMLInputElement>;
|
||||
|
||||
props.onChange?.(syntheticEvent);
|
||||
} else {
|
||||
props.onChange?.(event);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user