2 Datatables being sychronize without blinking

I would like to have 2 datatables being sychronized:
Say when a user clicks a row at the left table on a certain row, it would highlight the correct row on the other right table based on some CommonDate between those 2 tables.

I get it solved already with the below code. But one thing I like to improve on is NOT to have the blinking when select from one row to another. Is that possible? Now, when I select from one row to another, there is an instance the right table needs to be updated to the correct row, and it blinks once to be updated.

RowNumber_Updated <- reactive({
                       rownumber <- input$Report_table_rows_selected[length(input$Report_table_rows_selected)]
                       CommonDate <- ReportUpdated$CommonDate[rownumber]
                       ReportDetails <- getUpdatedReportDetails()
                       selectedrow <-  which(ReportDetails$CommonDate==CommonDate)
                       selectedrow <- as.integer(selectedrow)
})

output$Right_table <- renderDataTable(refresh_data(),
                                           #selection="single",
                                           selection = list(selected = c(RowNumber_Updated()))
                                           )

I think you want to be using datatable proxy :- https://yihui.shinyapps.io/DT-proxy/

But you already know how to detect a row click on one table and rerender the second table on that basis, you only need to update it through the proxy rather than by the renderDT ...
Why don't you try and come back if you get stuck?
Or else at least provide a reprex, a minimalexample of a working app with one table select updating another, which we can add in the proxy code for.
It's asking me to do more work than necessary to invent a working example for you from scratch

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

OK, I take a good look, it seems suitable for me, thanks for the link. I remember I come across it, but did not fully take a detailed look.

his example was using actionbutton to trigger the row number of the datatable.
mine would be using a row number from one datatable to trigger the other datatable.
I am not sure how to adapt his example to my case. any good ideas?

actually I have implemented the feature, just that it would blink at the next change. Not sure if there is any trick to disable the blink.

Did you see the example where rows that are selected in the select input on the left are selected in the datatable on the right without redrawing the table on the right ?

yes, I saw that, it is using actionbutton to select the row.
For my case, it is user selecting a particular row on the left table, which I need to correspond to the correct row on the right table, based on some CommonDate between those 2 tables. So I do not know how can I adapt that example for my case. Thanks.