{
(e.target as HTMLInputElement).select();
}}
onBlur={(e) => {
setIsFocused(false);
const num = Number((e.target as HTMLInputElement).value);
if (!Number.isNaN(num))
props.onChange?.(
(props.decimalsAllowed ?? 0) === 0 ? Math.round(num) : num
);
}}
ref={inputRef}
onChange={(e) =>
setInputValue((e.target as HTMLInputElement).value)
}
/>
) : (
{
if ((evt.target as HTMLButtonElement).closest(".actions"))
return;
setInputValue(props.value.toFixed(props.decimalsAllowed ?? 0));
setIsFocused(true);
}}
>
{props.controlButtons ? (
<>
>
) : null}