-
Notifications
You must be signed in to change notification settings - Fork 184
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
Feature request: allow edited table to be sent back to shiny (not just the cell that was edited) #521
Comments
I don't quite understand what you meant by the "edited table" in the subject. What exactly do you expect DT to do after a cell is edited? Currently it gives you |
I meant having something similar to what rhandsontable does, where you can always get a reference to the current state of the table. If I create a table output, and the user clicks on cell and edits it, it'd be useful if shiny was passed the new value of the table. Having the information about the exact cell that was edited (as is currently done) is also useful obviously, but there are many usecases where it'd be easier to have DT handle giving me back the modified table instead of the shiny developer having to manually change a dataframe entry using the currently available information. Similar to rhandsontable's |
Manually changing the data frame ( |
You're right it's not complicated, just thought it'd be a convenient feature because I've seen people attempt to do that many times, so it could be nice to have it supported natively. But I do understand it can be tricky to implement correctly |
I would like to re-up this thread. I think an important implication of getting the whole table is when dealing with reactive elements. Let's say you have a reactive table x rather than a fixed table x, how can you continue to use the persisted values of the edited table? |
Do we have to get "all " the cells updated and then update the dataframe? |
You can edit the whole table now. See #493 (comment). However, if you are using the server-side processing mode, you have to understand that only one page of the data is available on the client side (i.e. in the web browser), so you can only edit that page. For the client-side processing mode, you can edit the full table. See the examples mentioned in |
I realize this can be done by keeping the data as a reactive value and updating it manually. But I think it'd be a great addition to the edit feature if the current state of the table was synchronized between server and client. If the risk is performance issues, then perhaps it could be off by default but a parameter can be set to allow the table to be sent to shiny every time a change is made.
The text was updated successfully, but these errors were encountered: