React Material-UI autocomplete show Add button when there are no results

I’m trying to find a way to show an “Add” button when there are no results.
Is there a way to be able to get an event when no options where found? I see that there is an noOptionsText prop but I can’t seem to find a way to get triggered when there are no results.
Does anyone know if this is possible?

I’m using Material-UI v5-beta and React 17.

Answer

What you’re looking for is the Creatable freesolo mode of Autocomplete.
it’s in their documentation.

Here’s a link to the codesandbox as well.