I am currently working with mui's useAutocomplete hook
https://mui.com/material-ui/react-autocomplete/#useautocomplete
Is there a way to programmatically sort options and place the selected option at the top using JavaScript sorting, without resorting to flex order or any CSS workaround?
I have attempted to achieve this by using:
filterOptions = (options, { inputValue })
However, the current selection state is not passed here.