-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Hi,
I used the notebook linked below to test a real-time selection listener in different modes (table grouped or not).
In the process , I think I fixed 1 typo and a couple of bugs in grid.py
I still have one big issue : I cant get it to work with aggregated rows. Nothing fires at all.

Clicking anywhere on the Grouped columns (A in the screenshot) fires this:
{'data': [[]], 'index_rows': {'names': ['Index'], 'values': [[None]]}, 'index_columns': []}
Clicking on any other columns does not fire anything.
( Expanding the grouped row and clicking on leaf rows, works. )
Has any one been able to get that working?
Thanks in advance,
P.S. here is a description of the fixes/ enhancements (from inside the notebook):
- ipyaggrid/ipyaggrid/grid.py : 241 should be 'range' not 'cols' ? I think so.
- to_df['columns'] = pd.MultiIndex.from_tuples(*[data_up['index_columns']]) does not handle one corner case well (selecting a grouped column) and is copy-pasted about 5 times over in grid.py
- additional .get_selected_columns() call after processing a 'rows' fire . With rangeSelectionEnabled, i get a 'range' fire, then a rows fire but never a 'cols' fire. I trigger it programatically after 'rows'. Seems to work well in ungrouped mode.
- refactored the monolithic 'export' method to smaller functions so it can be clearer what each piece does and can be overridden if needed.
- added grid_range_selection method for easy hook-up (in my test examples I just display on a separate Output widget).
Metadata
Metadata
Assignees
Labels
No labels
