h2oai / wave

Realtime Web Apps and Dashboards for Python and R
https://wave.h2o.ai
Apache License 2.0
4.01k stars 328 forks source link

Default Grouped Table #1305

Open mtanco opened 2 years ago

mtanco commented 2 years ago

Is your feature request related to a problem? Please describe

There are many times when we might want to show tabular data to our users with a known, multi-column grouped structure. Today, we can ask users to group themselves and we have a non-grouped table where we just order the data how we want ahead of time, but we can't really show specific, grouped data

Describe the solution you'd like

A new parameter for ui.table_column called grouped. This is not groupable because it is not a user action, we are stating we want the data to be displayed in a specific way:

ui.table(
                name='deployments',
                multiple=False,
                groupable=False,
                height='600px',
                width='100%',
                columns=[
                    ui.table_column(name="deployment_name", label="Deployment name", sortable=True, min_width="300px", groupped=True),
                    ui.table_column(name="model_name", label="Model name", sortable=True, min_width="300px", groupped=True),
                    ui.table_column(name="model_version", label="Model version", sortable=True, min_width="300px"),

                ], rows=[
                    ui.table_row(name="1", cells=["Regression deployment", "Customer Churn Fast", "1"]),
                    ui.table_row(name="2", cells=["Binary classification", "Fraud Detection", "1"]),
                    ui.table_row(name="3", cells=["Credit Card", "Fastest settings", "1"]),
                    ui.table_row(name="4", cells=["Credit Card", "Baseline settings", "2"]),
                    ui.table_row(name="5", cells=["Credit Card", "Most interpretable", "3"]),

                ]
            )

image

Additional context

This is potentially related to #203 but a proposed different solution

shihan007 commented 2 years ago

Another use case Dataset Management – expand