rhandsontable icon indicating copy to clipboard operation
rhandsontable copied to clipboard

Issue when more than 1 character in dropdown

Open jhen1115 opened this issue 2 years ago • 0 comments

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

jhen1115 avatar Feb 03 '23 06:02 jhen1115