The useAutocomplete hook was created before Base UI existed and has code patterns different from the rest of the hooks in the library. Additionally, it does not use the lower-level building blocks from Base UI (like useList) but implements its whole functionality by itself. Reusing the same building blocks as other components could help us reduce the overall bundle size and have feature parity with the Select (where applicable).
There are a number of issues reported that could be solved by replacing the implementation.
Areas of improvement:
Issues that could be solved along the way:
Since this will likely be a breaking change, we should leave the current version intact (but deprecate it and remove it in the future).
The
useAutocompletehook was created before Base UI existed and has code patterns different from the rest of the hooks in the library. Additionally, it does not use the lower-level building blocks from Base UI (likeuseList) but implements its whole functionality by itself. Reusing the same building blocks as other components could help us reduce the overall bundle size and have feature parity with the Select (where applicable).There are a number of issues reported that could be solved by replacing the implementation.
Areas of improvement:
useListinstead of reimplementing keyboard navigationget*PropsfunctionsfreeSolo)Issues that could be solved along the way:
getOptionLabelcallback is getting the value instead of option object material-ui#31192onScrollToBottomprop material-ui#35653Since this will likely be a breaking change, we should leave the current version intact (but deprecate it and remove it in the future).