I search for solution to put selectedInputs in renderDataTable cells. I found js solutions: https://datatables.net/examples/api/form.html , however I do not know how to implement this solution in shinyjs as renderDataTable object. I would be grateful for hints / ideas / solutions how to implement editable renderDataTable in shiny.
相关问题
- Views base64 encoded blob in HTML with PHP
- R - Quantstart: Testing Strategy on Multiple Equit
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
Why not use standart fucntional of DT (Shiny.bindAll)
Example( in console print select of 1-st row)
Very similar to this: adding a column with TRUE/FALSE and showing that as a checkbox
Note that if you rerender the table, the inputs won't work unless you add some extra code to unbind.
edit:
Let's say the data in the table is reactive so it changes, and the table rerenders. You will need to explicitely unbind as per @yihui here: https://groups.google.com/forum/#!msg/shiny-discuss/ZUMBGGl1sss/zfcG9c6MBAAJ
So you need to add in the UI:
And then in the Server you trigger the function whenever you rerender the datatable with:
The colnames parameter is a vector of column names so when you specify a length one vector of FALSE it gives you a table with one column named FALSE. I am not sure of a straightforward way of removing column names from datatables. That would be a good SO question on its own.