Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autocomplete_input misses obvious matches #26

Open
acircleda opened this issue Jul 21, 2021 · 1 comment
Open

autocomplete_input misses obvious matches #26

acircleda opened this issue Jul 21, 2021 · 1 comment

Comments

@acircleda
Copy link

I am using autocomplete_input with a list of airports from airportr. You can search for three-letter IATA name or airport name. For the most part, this works well, but for some airports, (in my example "PIE"), it does not pull it up immediately. It finds PIE first in the middle of other airport names. Is it possible to search at the beginning before the middle?

Data:

airports <- airportr::airports %>%
  select(IATA, Name) %>%
  mutate(name2 = paste(IATA, " - ", Name)) %>%
  select(name2) %>% pull()

Shiny:

dqshiny::autocomplete_input("departure", "Departure Airport:", airports, max_options = 5, contains = TRUE)
@TSun-tech
Copy link

I am using autocomplete_input with a list of airports from airportr. You can search for three-letter IATA name or airport name. For the most part, this works well, but for some airports, (in my example "PIE"), it does not pull it up immediately. It finds PIE first in the middle of other airport names. Is it possible to search at the beginning before the middle?

Data:

airports <- airportr::airports %>%
  select(IATA, Name) %>%
  mutate(name2 = paste(IATA, " - ", Name)) %>%
  select(name2) %>% pull()

Shiny:

dqshiny::autocomplete_input("departure", "Departure Airport:", airports, max_options = 5, contains = TRUE)

I am having the same problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants