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

Addition of autocomplete parameter #652

Merged
merged 2 commits into from Jan 8, 2024
Merged

Conversation

MichalLauer
Copy link
Contributor

@MichalLauer MichalLauer commented Jan 6, 2024

Hello @pvictor,

First of all, I'm not sure why the whole files are marked as changed because I only updated function parameters, documentation and selectTag creation. If you happen to know why is that I'm happy to redo the PR.

This PR fixes a common Mozila bug as seen for example here:

An ease reprex is this code:

library(shiny)
library(shinyWidgets)

ui <- fluidPage(
  pickerInput(
    inputId = "somevalue",
    label = "My label",
    choices = c("a", "b", "c"),
    autocomplete = FALSE
  ),
  multiInput(
    inputId = "somevalue2",
    label = "My label",
    choices = c("a", "b", "c"),
  ),
)

server <- function(input, output, session) { }

shinyApp(ui = ui, server = server)

If you run this code in Mozilla, select any picker/multiPicker value and refresh the site, the option is cached and kept on. This can be fixed by adding autocomplete = "off" to the HTML element, which is what this PR does.

I only found this issue with these two widgets, but I'm happy to add it to more widgets if you find it appropriate. I can also move the parameter into the options list() - again, what you think fits this package the best :)

Thanks for your development and if any further changes are needed, feel free to let me know.

Edit: It just occurred to me that I didn't update NEWS.md/Package version... If that's something I should include, please, let me know.

@pvictor pvictor merged commit f1cfbc8 into dreamRs:master Jan 8, 2024
7 checks passed
@pvictor
Copy link
Member

pvictor commented Jan 8, 2024

Thank you !
No worries, I will update NEWS and docs.

Victor

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

Successfully merging this pull request may close these issues.

None yet

2 participants