Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
chore: add aggrid
Browse files Browse the repository at this point in the history
  • Loading branch information
d116626 committed Jan 24, 2024
1 parent f330db9 commit 66ebefa
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions app/📣 Home.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,19 @@ def get_agrid_table(data_with_image):
gb.configure_column("emoji", header_name="", editable=False, pinned="left")
gb.configure_column("object", header_name="Objeto", editable=False)
gb.configure_column("image_url", header_name="URL Imagem")
gb.configure_grid_options(enableCellTextSelection=True)
# Build grid options
grid_options = gb.build()

# # Set auto size mode
# Set auto size mode (if you still want to use it, otherwise remove this line)
grid_response = AgGrid(
data_with_image,
gridOptions=gb.build(),
gridOptions=grid_options,
columns_auto_size_mode=ColumnsAutoSizeMode.FIT_CONTENTS,
# update_mode=GridUpdateMode.MODEL_CHANGED | GridUpdateMode.COLUMN_RESIZED,
# fit_columns_on_grid_load=True
# height=400,
# width=1200,
# width="50%",
)

selected_row = grid_response["selected_rows"]
Expand Down Expand Up @@ -170,7 +175,7 @@ def get_agrid_table(data_with_image):
camera_data.iloc[0]["longitude"],
]
folium_map = create_map(chart_data, location=camera_location)
map_data = st_folium(folium_map, key="map", height=600, width=1200)
map_data = st_folium(folium_map, key="fig1", height=600, width=1200)
else:
map_data = st_folium(folium_map, key="fig1", height=600, width=1200)

Expand Down

0 comments on commit 66ebefa

Please sign in to comment.