adapt to changed return type in streamlit-aggrid
This commit is contained in:
@ -30,7 +30,13 @@ def aggrid(df, reload_data=False, height="auto", pagination=True, key=None):
|
||||
)
|
||||
|
||||
df = response.get("data", df)
|
||||
response["data"] = df[::-1] # undo reversed chronological order
|
||||
df = df[::-1] # undo reversed chronological order
|
||||
|
||||
#TODO: streamlit-aggrid changed return type
|
||||
if isinstance(response, dict):
|
||||
response["data"] = df # <= 0.2.3.post2
|
||||
else:
|
||||
response.data = df # >= 0.3.0
|
||||
|
||||
return response
|
||||
|
||||
|
Reference in New Issue
Block a user