excelR icon indicating copy to clipboard operation
excelR copied to clipboard

Get SelectedRow

Open MrugankC opened this issue 5 years ago • 2 comments

Hello team, Thanks for this great package.

I am currently using DT for creating tables in my ShinyApp. I was looking for substitutes for the DT package and found excelR's name in out of the articles on the internet. When I gave excelR a try, it looks great - especially the checkboxes for Logical values, row and column resizing, use of excel formulae etc.

But one thing I think is missing (or I don't know how to get it as I don't know JS) is the row selected / column selected / cell selected upon clicking on table. In DT, finding the rows clicked is easy : we need to use input$table_id_rows_selected. But couldn't find any such argument in excelTable() function.

An argument like getSelectedRow to the excelTable(), similar to getSelectedData will be very helpful.

I couldn't think of an alternative that could help me solve this problem, may be because I am newbie to shiny packages powered by JavaScript.

It would be great if you can add this to future versions. Thanks.

Cheers, Mrugank D. Chinchkhede

MrugankC avatar Aug 05 '20 09:08 MrugankC

@MrugankC Thank you for mentioning a much needed feature. I'll add it in pipeline of features to be added in the future versions.

Swechhya avatar Aug 06 '20 14:08 Swechhya

Maybe you could use get_selected_data_boundary(input$table) ? It gives you the coordinates of the top left bottom right selected sel. So if you want to known the selected row you look at $borderTop and $borderBottom. You first need to define that you are interested in it excelTable(DF, getSelectedData=T)

mmoisse avatar Oct 02 '20 16:10 mmoisse