Open vadimka123 opened 11 months ago
Related to https://github.com/mui/material-ui/pull/28190 I agreed with fact that input not should resetting on focus lose, but it should resetting on real value changes
I agree it's a bug. Would you like to work on it?
@ZeeshanTamboli clearOnBlur={true}
helped me
Facing the same issue.. clearOnBlur={true}
wont fix this as it change the flow. When i use clearOnBlur
text value in the text field is getting reset on every blur event. But its kind of a work around to skip this bug.
How ever its not a fix for this issue.
Any progress on this anyone? I'm encountering the same issue. I'm looking at this Search Input of the document. So, I wanna separate between selecting an option and input's onChange
<Autocomplete<Value, Multiple, true, true>
autoFocus={autoFocus}
disabled={disabled}
disableCloseOnSelect={disableCloseOnSelect}
fullWidth
multiple={multiple}
options={options}
onChange={handleOnChangeAutocomplete}
value={autocompleteValue}
ref={ref}
required={required}
renderInput={renderInput}
{...autocompleteProps}
// With freeSolo enabled, input should be reset after onChange but it's not
freeSolo
disableClearable
open
forcePopupIcon={false}
PopperComponent={PopperComponent}
PaperComponent={(props) => PaperComponent({ paperFooter, paperHeader, ...props })}
/>
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example: https://codesandbox.io/p/sandbox/awesome-lucy-vtndj5?file=%2Fsrc%2FApp.tsx%3A17%2C3
Steps:
Current behavior 😯
input is not resetting on value changes with freeSolo prop
Expected behavior 🤔
input is resetting on value changes with freeSolo prop without this prop all good works https://codesandbox.io/p/sandbox/quiet-sky-xvllpd?file=%2Fsrc%2FApp.tsx
Context 🔦
Autocomplete which having reset values in some cases with enabled freeSolo
Your environment 🌎