Skip to content
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

AG-Grid's 'rowSelection': {'mode':"multiRow",'headerCheckbox':False} won't work #3854

Open
python-and-fiction opened this issue Oct 10, 2024 · 3 comments
Labels
dependencies Pull requests that update a dependency file
Milestone

Comments

@python-and-fiction
Copy link
Contributor

Description

It is same as ag-grid/ag-grid#8855
Following code won't work as expected.

from nicegui import ui

grid = ui.aggrid({
    'defaultColDef': {'flex': 1},
    'columnDefs': [
        {'headerName': 'Name', 'field': 'name'},
        {'headerName': 'Age', 'field': 'age'},
        {'headerName': 'Parent', 'field': 'parent', 'hide': True},
    ],
    'rowData': [
        {'name': 'Alice', 'age': 18, 'parent': 'David'},
        {'name': 'Bob', 'age': 21, 'parent': 'Eve'},
        {'name': 'Carol', 'age': 42, 'parent': 'Frank'},
    ],
    'rowSelection': {'mode':"multiRow",'headerCheckbox':False},
    
}).classes('max-h-40')

ui.run(native=True)

E5NCGJC5{9{3(KOODE P52M

When i upgrade ag-grid to 32.2.1, it works well.
6 D5EYT52YGFI {~1VJG@4P

@falkoschindler
Copy link
Contributor

Thanks for reporting this issue, @python-and-fiction!
It looks like we would need to upgrade from our current AG Grid version 32.1.0 to at least 32.2.1 or the most recent 32.2.2. Usually we only upgrade dependencies for major releases. But I guess going from 32.1 to 32.2 shouldn't introduce breaking changes.

@falkoschindler
Copy link
Contributor

Unfortunately, upgrading from 32.1 to 32.2 breaks existing behavior, e.g. calling the "selectAll" method doesn't work without specifying the "rowSelection" option.

@python-and-fiction Is it possible that the feature you're describing didn't exist in AG Grid <=32.2? I just tried your code with NiceGUI 1.4.37 and it doesn't work either. In this case, this issue isn't a bug but a feature request. And since it depends on upgrading third-party libraries, it would need to wait for NiceGUI 3.0.

@falkoschindler falkoschindler removed the bug Something isn't working label Oct 15, 2024
@falkoschindler falkoschindler removed this from the 2.4 milestone Oct 15, 2024
@python-and-fiction
Copy link
Contributor Author

python-and-fiction commented Oct 15, 2024

@falkoschindler yes, https://github.com/ag-grid/ag-grid/blob/v32.1.0/community-modules/core/src/main.ts has no RowSelectionOptions, it was added in https://github.com/ag-grid/ag-grid/blob/v32.2.0/community-modules/core/src/main.ts

@falkoschindler falkoschindler added this to the 3.0 milestone Oct 17, 2024
@falkoschindler falkoschindler added the dependencies Pull requests that update a dependency file label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants