-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve edit functionality #493
Comments
These are fantastic suggestions and also good challenges! But I'm afraid I'll have to defer the work to a future contributor like @shrektan :) |
Thanks for the suggestion. The whole point is to make the table editing easier and for this goal we need to take inspirations from other table libraries like rhandsontable~ It seems like a good challenge. I'll think about it~~ 🐌 |
Please, could you add functionality to edit or delete a perticular row from DT? There are many users who would love to have a CRUD operation of Databases through shiny. DT is nicest of all the interface for this reason. Something like this. https://community.rstudio.com/t/building-crud-with-shiny/2881/9 |
@mgirlich Thank you for the code. I was looking for the same functionalities. Your code works for me but I don't know how to obtain the updated values. Using your example, how can i get the updated "x1$input"? |
@tellyshia The value and row just updated is saved in To see this in action I recommend using an extra
I hope this helps you. |
@mgirlich Thanks. I realized the reason why it didn't work for me was because I used characters instead of numbers in input_{row}. Do I really need to have row number in my table for this to work? What if my column has unique variable names like the table below?? Actually it would help the readers to understand your example better if the column names are not so generic, e.g. "row" and "input". Hope to see your reply. Thanks in advance. :)
|
I edited my example to make it better understandable. This should hopefully make it clear to you. |
Thank you for your generosity. If I may extend your example more, how can I add another shiny input column next to it. For example, a checkbox for TRUE/FALSE. I am not sure how to modify the part on #call script to display correct values.
|
With the current dev version of DT, you can bulk edit rows, columns, or the whole table: Please check out the changelog and see if it fits your purpose: https://github.com/rstudio/DT/blob/master/NEWS.md#changes-in-dt-version-06 Thanks! |
Unfortunately, I hit the wrong button and deleted the old content here instead of only updating the code...
Below is an example for a fast edit ability without the need of a double click. In some cases this could be more useful than the current edit function.
The text was updated successfully, but these errors were encountered: