File tree Expand file tree Collapse file tree 1 file changed +17
-14
lines changed
Expand file tree Collapse file tree 1 file changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ title: Aligned Grids
44
55AgGrid provides a way to align multiple grids together. This is useful when you want to display related data in a synchronized manner.
66
7- You can do so through the ` aligned_grids ` prop. This prop takes a list of grid IDs that you want to align.
7+ You can do so through the ` aligned_grids ` prop. This prop takes a list of grid IDs that you want to align.
88
99``` python demo exec
1010import pandas as pd
11-
11+ import reflex as rx
1212import reflex_enterprise as rxe
1313
1414# Olympic winners data (originally from https://www.ag-grid.com/example-assets/olympic-winners.json)
@@ -41,18 +41,21 @@ column_defs = [
4141
4242def aligned_grids_page ():
4343 """ Aligned grids demo."""
44- return rxe.ag_grid(
45- id = " grid1" ,
46- column_defs = column_defs,
47- row_data = row_data,
48- aligned_grids = [" grid2" ],
49- width = " 100%" ,
50- ), rxe.ag_grid(
51- id = " grid2" ,
52- column_defs = column_defs,
53- row_data = row_data,
54- aligned_grids = [" grid1" ],
55- width = " 100%" ,
44+ return rx.el.div(
45+ rxe.ag_grid(
46+ id = " grid1" ,
47+ column_defs = column_defs,
48+ row_data = row_data,
49+ aligned_grids = [" grid2" ],
50+ width = " 100%" ,
51+ ), rxe.ag_grid(
52+ id = " grid2" ,
53+ column_defs = column_defs,
54+ row_data = row_data,
55+ aligned_grids = [" grid1" ],
56+ width = " 100%" ,
57+ ),
58+ class_name = " flex flex-col gap-y-6 w-full"
5659 )
5760
5861```
You can’t perform that action at this time.
0 commit comments