Closed somangshu closed 2 years ago
@somangshu this will require #1724 because the number of columns are variable. Another simple way of doing this is to create a column with an edit icon and clicking it turns the row of the table into all input boxes. The user can then configure an onUpdate action handler. Basically make the single row inline editable with a save button and just ask the user to configure the save action
@Nikhil-Nandagopal While I feel tempted by the latter idea which could be quick to implement, But I think for a long term and scalable solution the initial thought is better, If we develop this in tandem with #1724, we will cover more use cases. Ex: how you mentioned input widget for each row key, We could also decide the widget based on the datatype, like a dropdown for array object.
Another user had a use case for this that required them to manually build a form/button to edit the table. Since the button they configured worked on a single column, the rest of the columns got cleared on update. In our solve for this, we should make sure our implementation makes it easier for users to update differentially
if possible.
@somangshu I think there are usecases for both. The JSON form is different while a user has explicitly asked for this inline edit here #5400 Ant design has this component https://ant.design/components/table/#header
Got a request from one more user on Discord. Their table connects to multiple queries and they want inline edit+update.
Does react table support inline edits?
Ant design specifically does allow the inline editing in the table widget, We will have to triage this an understand the implementation here.
@riodeuno any inputs here?
Got One more feature request for this
Edit
button, which on click would show "save" and "cancel" buttons. It will also now show all cells in the row as editable text fields with the current values pre-filled.onRowUpdate
trigger property in the property pane. (property of the table)onRowUpdate
passes the current updated row object in the context.react-table
library by updating the renderer. Here is an example of an editable cell.@somangshu this will require #1724 because the number of columns are variable. Another simple way of doing this is to create a column with an edit icon and clicking it turns the row of the table into all input boxes. The user can then configure an onUpdate action handler. Basically make the single row inline editable with a save button and just ask the user to configure the save action
*create a column with an edit icon and clicking it turns the row of the table into all input boxes @Nikhil-Nandagopal can you share an example how to click and turns the row of the table to input boxes, then click to save the change?
@ggs331 check this out, This is from ant.design, But we will be following a somewhat similar UX.
Can a column allow editing from a drop-down or file picker instead of an input field?
When we have #1724, This will be pretty straight forward. For now, I suggest we implement only input fields.
Will we do inline editing or will we open a modal to edit the table data?
Check out this project: https://github.com/nocodb/nocodb their focus is on providing users with an airtable like table to edit their databases.
We are providing inline editing experience for now. Check this example out. The enhancement to this will be joining it with the Json Form Widget to edit is a full fledged functional form.
What you are seeing ☝️ is better implemented with a DataGrid. Using a table for something like this might be very hard to maintain and could also cause performance degrade
Got it. Will inline editing work for compact, tall rows versions of the table as well?
Would love Inline Editing in the table widget. Would be really helpful and make it possible to build much smoother CRUD Apps. Maybe even add a delete and + symbol in the bar with the search text and pagination too. Then you could delete rows from there and when + button is pressed a new row appears and can be added. Then you could build really compact and clean CRUD components.
@Schnurres A feature to add new entries and delete entries is a neat idea. As you mentioned, we can have CRUD operations in one place.
@somangshu I was wondering if we should push these features out in phases, starting with the editing experience, then adding and deleting. Shall we convert this into an epic from a feature?
@areyabhishek The UX in compact modes is a good question. I would suggest the following UX. When the table is being edited, the row heights are maintained. As the rows allow for single line of text, we can allow the editable rows to simply overflow the text as in a single line input elements. @momcilo-appsmith Any suggestions here?
We will need a new entry in the property pane for onRowInsert
and onRowDelete
action triggers, along with the onRowUpdate
trigger we will have for the rows which are edited.
@riodeuno I am not sure I understand the experience you are suggesting.
From an ongoing discussion:
@somangshu this sounds awesome. Can't wait for these improvements to go live. This will improve Appsmith so much. The dropdown feature would be so good and really improve the inline editing function even further, Really like these ideas.
@Schnurres thanks for the feedback, this helps us validate we are in the right direction. Kindly let us know if there is anything we might be missing.
@somangshu
Let's make decisions regarding the details based on designs of the UX.
hello! any update on this feature? :D
Hey @softwarebloat this feature has been designed and is currently under development. @sbalaji1192 and @somangshu can tell you more about when it will be launched.
You can check the design here (this file will contain future designs in development too, not just inline editing): https://www.figma.com/file/JEalu7g3jDLzWWnKsfE6mB/Table-Improvements-2022?node-id=2%3A1
@Nikhil-Nandagopal We have incorporated the (tabulator ) component inside Appsmith. Below is a sample
@manikumarnune123 that's pretty cool! We'd love to see a PR on how you did that
Tabulator is a good component. i have suggested it some months ago..
Any update on this or any timeline for this?
Hey @mdmozibur, we're in the final phase of the development. We don't have a hard timeline yet. but we're targeting to release this before EOM.
I would love to try this out even as a test user
Hey @mbilliodeaux thanks for helping us out. I would like to get your feedback on this on a call, would you be willing to book a slot which works for you using this link - https://calendly.com/dilip_pitchika/30min
Summary
As a user, I should be able to configure a table widget to have editable rows. When the configuration is enabled from the property pane, an action will be available against each row, onClick, a form should open with all visible row fields which can be edited. The query/api call to ingest changes from the form should be available in the table widget property pane. This form will always open up as form modal.
Motivation
This is an easy implementation/workaround of a data grid that can come in handy to community users