BS Input with Autocomplete - Index needed

I have a BS input control with autocomplete = on.
I fill a list of data and when a user selects a value, I need to get the selected index of the list for the value that is selected in the control.
I did not see an index property and I dont see how IndexOf would work…
Can I get the index of the selected value?

Can you explain a bit more about the list of data? The BS4 Input control is a single line input field.

Have you tried using .value, not sure if that will work or not.
Or just prefix your datalist with:
1: Some text here
2: Some text here
3: some text here