appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

[Feature] Tree Table Widget

Open Nikhil-Nandagopal opened this issue 5 years ago • 21 comments

Summary

A user would like a tree view of the table as shown where each row can be collapsed / expanded.

  • https://ant.design/components/table/#header
  • https://ant.design/components/table/#components-table-demo-tree-data

Front logo Front conversations

Nikhil-Nandagopal avatar Jun 25 '21 08:06 Nikhil-Nandagopal

Should this be considered in new widget or a functionality of the current table widget?

somangshu avatar Jun 28 '21 06:06 somangshu

@somangshu does the underlying component support it as a prop or a separate component? Is it easy to configure in the property pane? My guess is a separate widget is better but as always let's fall back to the above 2 questions ☝️

Nikhil-Nandagopal avatar Jun 28 '21 06:06 Nikhil-Nandagopal

@Nikhil-Nandagopal while other design frameworks will tell us that the feature can be under the same component, I feel that the UX in the Appsmith environment will be very complicated (answer to the second question).

In favour of the above, I would also consider this to be a separate widget!

somangshu avatar Jun 28 '21 07:06 somangshu

How would the user choose what to show when the row is expanded? This feels like a table control, but for discovery we can treat it as a new widget.

areyabhishek avatar Jun 28 '21 21:06 areyabhishek

@somangshu it need not be very complicated. We just need a property to enable horizontal scroll / collapse columns. If horizontal scroll is enabled, all columns that cannot be fit on the screen can be scrolled to be viewed. If Collapse columns is enabled, all columns that do not fit the table width are collapsed into the + option

Nikhil-Nandagopal avatar Jun 29 '21 05:06 Nikhil-Nandagopal

@areyabhishek your point is valid, Setting this up from the property pane could feel complex for the user/dev.

@Nikhil-Nandagopal

  • Isn't Horizontal scroll already present today?
  • I thought the original requirement is to expand the row to show more details and not the column. Example

somangshu avatar Jun 29 '21 14:06 somangshu

@somangshu yes horizontal scroll is present. It is used when the user wants to see additional columns that cannot be shown in the table. Expand row also does the same thing, it is used to show additional columns of rows that cannot be shown in the table. Thus the two are simply 2 modes of achieving the same goal via different UX. One where you scroll to see the next column and one where you expand the row to see the next column. The additional details are just other columns if that is your confusion. Tables are always arrays of rows

Nikhil-Nandagopal avatar Jun 29 '21 14:06 Nikhil-Nandagopal

Got it. I was thinking about showing additional information against each row. This should be fairly simple them

somangshu avatar Jun 29 '21 14:06 somangshu

note:

  • New prop: collapse columns - toggle; Table wide setting
    • Enabled: No horizontal scroll and the rest of the data appears as an accordion when the row data is expanded
    • Disabled: all additional columns can be viewed by scrolling horizontally

somangshu avatar Aug 09 '21 12:08 somangshu

@Tooluloope we need to triage if its possible to do this in the current table widget implementation

somangshu avatar Aug 09 '21 12:08 somangshu

From my findings, the Current Table Library doesn't support showing columns as it can only support showing nested rows and not column.

Tooluloope avatar Aug 28 '21 01:08 Tooluloope

I have a single sql table of items which may optionally have a parent and/or child in the same table. This kind of widget would be great for visually modelling these parent-child relationships without hacking something together with a single table widget.

Jonsey4 avatar May 09 '22 20:05 Jonsey4

Will there be some requirement around how to represent a hierarchy in this widget? Like, the Select widget needs columns named value and label.. Some hierarchies use Integer (non-intelligent) ids while some people like to use intelligent IDs to represent their hierarchy parent-child relationships... I guess this could be some sort of property dropdown... like when you define chart Series?

pchambless avatar May 09 '22 20:05 pchambless

Thanks for the context @Jonsey4 @pchambless

cc @dilippitchika FYI, something to consider

somangshu avatar May 10 '22 06:05 somangshu

Another user on Discord requested this feature.

amelia-c0n avatar Sep 23 '22 13:09 amelia-c0n

Really interested in this feature. The ability to show a BOM tree is very usefull

brusamatteo avatar Jul 25 '23 15:07 brusamatteo

This would be a great feature. Other low-code systems I'm evaluating allow you to drag and drop widgets into the expanded area beneath each row, to build out whatever needed, and the widgets access the same context (currentRow) etc.

Screenshot 2024-01-17 at 10 13 02 AM

zuroma999 avatar Jan 17 '24 18:01 zuroma999

@zuroma999 thanks for dropping that comment. I'd be interested to learn about what you're building and how you plan on using this widget. Would you be up for a quick chat? You can find a convenient time on my calendar below

https://calendly.com/appsmith-nikhil/30min?back=1&month=2024-01

Nikhil-Nandagopal avatar Jan 18 '24 09:01 Nikhil-Nandagopal

@Nikhil-Nandagopal, sure, I'll book something on your calendar to discuss.

zuroma999 avatar Jan 18 '24 17:01 zuroma999

any updates?

amirmf avatar Nov 10 '24 13:11 amirmf