Evertything depends on typehead you're using.
Usually typehead or autocomplete objects allow to list:
So if you use a list of objects instead of simple strings typehead should separate readable value from submitted one.
Some typehead allow to handle events at the end of fetching data. So if your script detect that element inserted by user doesn't exist, via ajax, you can insert it (after user consent it) and re-run fetching to retrieve last element created.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community