Skip to content

aggrid cannot set group header #94

Description

@CrystalWindSnake

aggrid in nicegui allows grouped table headers, but not in the bi module in ex4nicegui.

grid = ui.aggrid(
    {
        "defaultColDef": {"flex": 1},
        "columnDefs": [
            {
                "headerName": "xxxx",
                "children": [
                    {
                        "field": "name",
                    },
                    {
                        "field": "age",
                    },
                ],
            },
            {
                "field": "parent",
            },
        ],
        "rowData": [
            {"name": "Alice", "age": 18, "parent": "David"},
            {"name": "Bob", "age": 21, "parent": "Eve"},
            {"name": "Carol", "age": 42, "parent": "Frank"},
        ],
        "rowSelection": "multiple",
    }
).classes("max-h-40")


ds = bi.data_source(
    pd.DataFrame(
        {"name": "Alice", "age": 18, "parent": "David"},
        {"name": "Bob", "age": 21, "parent": "Eve"},
        {"name": "Carol", "age": 42, "parent": "Frank"},
    )
)

ds.ui_aggrid(
    options={
        "columnDefs": [
            {
                "headerName": "xxxx",
                "children": [
                    {
                        "field": "name",
                    },
                    {
                        "field": "age",
                    },
                ],
            },
            {
                "field": "parent",
            },
        ],
    }
)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions