通过上下文菜单在rhandsontable中添加多行

问题描述

我正在使用rhandsontable软件包,并想添加一个上下文菜单选项,以向生成handsontable添加多行。我尝试将this的示例改编成我的R等效项,但没有运气。我相信我的javascript是问题所在,但没有经验来找出问题所在。

如何添加用于添加多行的自定义上下文菜单项?预先感谢。

代表

library(rhandsontable)

iris %>%
  head(5) %>%
  rhandsontable() %>%
  hot_context_menu(customOpts =
                     list(
                       name = "Add 5 rows at the top",callback = htmlwidgets::JS(
                         "function (key,options) {
                              this.alter('insert_row',1,5);
                              this.render();
                              }"
                       )
                     ))

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)