Flexible autocomplete component