jrowen / rhandsontable

A htmlwidgets implementation of Handsontable.js
http://jrowen.github.io/rhandsontable/
Other
380 stars 148 forks source link

workaround: customBorders are not updated #336

Open rfaelens opened 4 years ago

rfaelens commented 4 years ago

CustomBorders are not correctly removed when new customBorders are added. This is a known issue and has been reported https://github.com/jrowen/rhandsontable/issues/159 and also in https://github.com/handsontable/handsontable/issues/2002 .

A workaround is to reset the borders before applying the new borders:

shinyjs::runjs("HTMLWidgets.find('#table').hot.getPlugin('CustomBorders').clearBorders()")

Would you consider adding this as a workaround here? https://github.com/jrowen/rhandsontable/blob/639b0a511b216391df44c45ea7ef8c934269c28a/inst/htmlwidgets/rhandsontable.js#L53

rfaelens commented 4 years ago

See https://gist.github.com/rfaelens/285ad645e24aba047a1d97899a9fd480 for an example

jrowen commented 4 years ago

Would you be willing to submit a PR with your suggestion?