I defined my own rhansontable right-click event.
I have two rhandsontables on screen. Both are wrapped in uiOutput.
Now I right click a table cell “Action A”, and cusslct is assigned a new value.
The question is I want to know the right click from which table on the screen.
Any idea ?
insert_slct_vct_cus <- function(target_table) {
rhandsontable::hot_context_menu(
hot = target_table,
# allowRowEdit = FALSE,
# allowColEdit = FALSE,
customOpts = list(
schedule_editor_menu = list(
name = "Select vector",
callback = htmlwidgets::JS(
"function(key, options) {
var val = Math.random();
Shiny.setInputValue(
'body_ui_1-assumptions_ui_1-cusslct',
val,
{priority: 'event'});
}"
)
)
)
)
}