-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aggrid cannot set group header #94
Labels
question
Further information is requested
Comments
Currently options can be modified by accessing the native element ds = bi.data_source(
pd.DataFrame(
{"name": "Alice", "age": 18, "parent": "David"},
{"name": "Bob", "age": 21, "parent": "Eve"},
{"name": "Carol", "age": 42, "parent": "Frank"},
)
)
table = ds.ui_aggrid()
col_defs: List[Dict] = table.element.options["columnDefs"]
# Remove the configuration of name and age.
col_defs.pop(0)
col_defs.pop(0)
# Insert a grouping of name and age
col_defs.insert(
0,
{
"headerName": "xxxx",
"children": [
{
"field": "name",
},
{
"field": "age",
},
],
},
) |
Perhaps a way to tweak the configuration could be provided ds.ui_aggrid().adjust_column_defs(
{
# 0 means put in the first column
0: {
"headerName": "xxxx",
"children": [
{
"field": "name",
},
{
"field": "age",
},
],
},
},
# Remove some columns
remove=["name", "age"],
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
aggrid in nicegui allows grouped table headers, but not in the bi module in ex4nicegui.
The text was updated successfully, but these errors were encountered: