reactable
reactable copied to clipboard
Edit table
Hi @glin, congrats for the pkg , looks really good!.
I wonder if Is there any possibility to edit values in reactable
?
Thanks in advance. Keep it up! Regards
Hi, thanks for the suggestion! React Table doesn't support table editing out of the box, but it wouldn't be too hard to at least add a simple, inline editor like this: https://codesandbox.io/s/github/tannerlinsley/react-table/tree/master/archives/v6-examples/react-table-editable-content
Do you have any thoughts on how a more useful table editor would work? I had some questions after thinking about it for a bit:
- How would we begin editing a cell? Clicking on the cell, double-clicking the cell, clicking an "edit" button in the cell?
- Should we edit cells in the table itself or through a separate pop-up/modal?
- Should we edit individual cells or entire rows at a time?
- Would it be useful to allow adding/deleting rows?
- Would it be useful to customize inputs based on column type? e.g. dropdown for factors, calendar for dates, number-only text field for numerics
- Would it be useful to restrict certain columns, rows, or cells for editing?
Thannks @glin. In fact, I would like all what you suggest. Below more detailed answers
-
How would we begin editing a cell? Clicking on the cell, double-clicking the cell, clicking an "edit" button in the cell? Ans.: Double click would be the best way.
-
Should we edit cells in the table itself or through a separate pop-up/modal? Ans. : Both options would be great. Maybe, have a function's argument
editView
with two options:table
(by default to edit directly in the table) andmodal
to edit in a separate pop-up/modal. -
Should we edit individual cells or entire rows at a time? Yes, we should. Perhaps the first step would be by
edit by cell
and the moveedit by column
- Question (4) and (5) You read my mind, That would be very helpful for users
- Would it be useful to restrict certain columns, rows, or cells for editing?
Yes, it would nice to give the possibility to edit in different ways. For example, have an argument
editColumns
with two values:All
to edit all columns, and vector argument likec(col1, col2,..coln )
as where the users introduce the index of the columns that they want to edit.editRows
, should be similar toeditColumns
. HaveeditCells
argument, where users insert a list of(x,y)
pair. Ex.:editCells=list( c(1,2), c(4,5), c(90,88) )
I leave these comments under your consideration.
I like this idea! It would be nice if the edit can be reflected to server-side on Shiny.
is there any development on this?
Hi, thanks for the suggestion! React Table doesn't support table editing out of the box, but it wouldn't be too hard to at least add a simple, inline editor like this: https://codesandbox.io/s/github/tannerlinsley/react-table/tree/master/archives/v6-examples/react-table-editable-content
Do you have any thoughts on how a more useful table editor would work? I had some questions after thinking about it for a bit:
- How would we begin editing a cell? Clicking on the cell, double-clicking the cell, clicking an "edit" button in the cell?
- Should we edit cells in the table itself or through a separate pop-up/modal?
- Should we edit individual cells or entire rows at a time?
- Would it be useful to allow adding/deleting rows?
- Would it be useful to customize inputs based on column type? e.g. dropdown for factors, calendar for dates, number-only text field for numerics
- Would it be useful to restrict certain columns, rows, or cells for editing?
Hi, is this feature is still pending? please let us know. thank you. Interested in using something like a dropdown selection for factors to edit a table cell.
I can't believe I just found this package. Wonderful! I'm curious if any movement has been made on making anything editable?
+1
This would be a very useful feature
+1
In my opinion, this is a best package for insert tables in Shiny apps, with the to edit table resource the package will be perfect
+1 for the editing!
editing would really make reactable complete
for shiny users, an alternative is using the select option already in reactable
You can click and selector in row, and create a logic to open a modal in shiny app with inputs that edit the fields the row, and when you click to close the modal and save, this inputs change the dataframe into shiny, and edit the data.
If all this is a reactive logic, the table in user interface will be edited
I use this and work very well
for shiny users, an alternative is using the select option already in reactable
You can click and selector in row, and create a logic to open a modal in shiny app with inputs that edit the fields the row, and when you click to close the modal and save, this inputs change the dataframe into shiny, and edit the data.
If all this is a reactive logic, the table in user interface will be edited
I use this and work very well
Would be useful if you share a reproducible example for to have an idea of how to implement it (I am not a react developer)
@omarbenites This gist may be a good reproducible example to get you started on what @henrique1008 suggested.
Meanwhile, I am eagerly waiting for an official editable reactable implementation as well 🤞🏼
Looking forward to using this new functionality. I hope it can be implemented soon.
Hi @glin, what a powerful package! I'm just wondering if there is any update on the feature of editing. Thanks!
It would be cool if reactable were editable. In fact, in the process of developing a shiny app with reactable, we have more and more requests for table edits, additions, deleations, validation and so on.
Hi, thanks for the suggestion! React Table doesn't support table editing out of the box, but it wouldn't be too hard to at least add a simple, inline editor like this: https://codesandbox.io/s/github/tannerlinsley/react-table/tree/master/archives/v6-examples/react-table-editable-content
Unfortunately this link seems to have died 🙁 Is it possible to share the code in a gist please?
I got a ping from this thread with your message @wurli so I figured I'll share this.
At Appsilon, we are now using reactable.extras for most of the editing use-cases. The text_extra()
definition works really well.
@DeepanshKhurana Thanks for this - had a quick test and this looks like it'll be perfect for what I need! For anyone else who takes a look, the easiest way to get started is to run the first example from the custom inputs tutorial.