rhandsontable icon indicating copy to clipboard operation
rhandsontable copied to clipboard

@jrowen I am having similar problems. When I use `hot_col("target_col", type = "dropdown" ...)`, it works just fine. When I use `hot_cols(renderer = "js here")` it conditionally highlights what I want. But it removes the dropdown arrow from `type = "dropdown"`. The type is still a dropdown (it works if I click the cell) but the arrow is missing. How do I fix that?

Open cca32 opened this issue 5 years ago • 2 comments

@jrowen I am having similar problems. When I use hot_col("target_col", type = "dropdown" ...), it works just fine. When I use hot_cols(renderer = "js here") it conditionally highlights what I want. But it removes the dropdown arrow from type = "dropdown". The type is still a dropdown (it works if I click the cell) but the arrow is missing. How do I fix that?

Is there a way to make the dropdown arrow bold?

Originally posted by @cca32 in https://github.com/jrowen/rhandsontable/issues/184#issuecomment-478538082

cca32 avatar Apr 01 '19 11:04 cca32

I used DropdownRenderer like in the text below and it was able to make the arrows available.

renderer = "
          function(instance, td, row, col, prop, value, cellProperties) {
            Handsontable.renderers.DropdownRenderer.apply(this, arguments);
            td.style.background = 'lightblue'}
          "

jcoronel25 avatar Aug 29 '19 02:08 jcoronel25

awesome, it works !

rhandsontable(my_DF) %>%
      hot_col(2:ncol(my_DF),type = "dropdown",source=choix)%>%
      hot_cols(2:ncol(my_DF),renderer =   "
           function (instance, td, row, col, prop, value, cellProperties) {
             Handsontable.renderers.NumericRenderer.apply(this, arguments);
             if (value == 'disponible') {
              td.style.background = 'white';
             } else if (value == 'occupé') {
              td.style.background = 'lightblue';
             } else if (value == 'occupé covid19') {
              td.style.background = 'lightblue';
             } else if (value == 'ventilation mécanique') {
              td.style.background = 'red';
             } else if (value == 'VM covid19') {
              td.style.background = 'red';
             } else if (value == 'non disponible') {
              td.style.background = 'lightgrey';
             }
             Handsontable.renderers.DropdownRenderer.apply(this, arguments);

           }")

phileas-condemine avatar Mar 18 '20 12:03 phileas-condemine