-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
Description
Arrow navigations with left/right/up/down works in ipyaggrid
in JupyterLab and JupyterLab Classic, but fails to work in JupyterLab Notebook (see provided example).
In JupyterLab Notebook the arrow keys are interpreted as navigations across the notebook cells, instead of the agggrid cells, even when aggrid is in focus. This works correctly in both Lab and Classic views and the issue is limited to Notebook view.
Reproduce
- Save the provided code as a jupyter notebook and run
- Click on any cell in the AGGrid
- Use arrow keys to navigate between AGGrid cells
- Open the same notebook in Notebook mode
- Arrow keys no longer work inside AGGrid
- Repeat this in classic mode and it works again
Expected behavior
The arrow keys navigation should work in Notebook mode, just like it works under Lab and Classic.
Context
- Operating System and version: windows 10 or windows 11
- Browser and version: reproducible across all versions of firefox and chrome
- Jupyter Notebook version: 7.4.5
- notebook==7.4.5
- jupyterlab==4.4.6
- ipython==9.4.0
- ipykernel==6.30.1
- ipyaggrid==0.5.4
Notebook example to reproduce
import pandas as pdfrom ipyaggrid import Grid
df = pd.DataFrame({
'Name': ['Alice', 'Bob', 'Charlie', 'Diana', 'Eve'],
'Age': [25, 30, 35, 28, 32],
'City': ['New York', 'London', 'Paris', 'Tokyo', 'Sydney'],
'Score': [95.5, 87.2, 92.1, 88.9, 91.3]
})grid_options = {
'columnDefs': [
{'field': 'Name'},
{'field': 'Age'},
{'field': 'City'},
{'field': 'Score'}
],
'defaultColDef': {
'sortable': True,
'filter': True,
'resizable': True
},
'enableRangeSelection': True,
'animateRows': True
}grid = Grid(
grid_data=df,
grid_options=grid_options,
theme='ag-theme-balham-dark',
height=300
)grid
