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

Issue when more than 1 character in dropdown #424

Open
jhen1115 opened this issue Feb 3, 2023 · 0 comments
Open

Issue when more than 1 character in dropdown #424

jhen1115 opened this issue Feb 3, 2023 · 0 comments

Comments

@jhen1115
Copy link

jhen1115 commented Feb 3, 2023

Hi,

There is a dropdown validator issue when more than 1 character in dropdown. For example,

rhandsontable(data.frame(char = rep("Ab", 2))) %>%
   hot_col(
      "char",
      type = "dropdown",
      source = "Ab"
)

The background of cells will be changed to red after the dropdown is opened.
image

However, if the "Ab" is changed to "A", then the background of cells will not be changed after the dropdown is opened.

Now, the below validator argument is added to resolve the issue

validator = paste0(
   "function(value, callback) {",
   "   callback(value === 'Ab' ? true : false);",
   "}"
)

..., however, does anyone have better resolution for solving this issue?

Thank you

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

1 participant