I'm trying to achieve autofocus functionality when fields are empty .. but in this situation autoFocus always works
<Controller
name="sum"
control={control}
render={({ field: { value, onChange } }) => (
<TextField
value={money || value}
onChange={onChange}
error={!!errors?.sum}
autoFocus={!value}
helperText={errors?.sum && errors.sum?.message}
InputProps={{
placeholder: 'Например, 100 000 000',
endAdornment: (
<InputAdornment position="end">
<SvgRoubleIcon />
</InputAdornment>
),
inputComponent: CurrencyInput,
}}
/>
)}
/>