You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting a key for the condition_tree(), upon rerunning the app and updating the config (i.e. table changes), the dropdown of available fields does not change. Even deleting the session state key before calling condition_tree() does not change the available fields.
Code:
config = config_from_dataframe(table)
# Optional, does not affect results
if 'condition_tree' in st.session_state:
del st.session_state['condition_tree']
query_string = condition_tree(config,
min_height = 400,
placeholder = 'No rules created',
always_show_buttons = True,
key = 'condition_tree'
)
Basically, even if my table changes in this code, the condition tree will still hold on to the old config. This does not happen when not using a key. My intention with using the key is to be able to save the query and recall it at a different time.
The text was updated successfully, but these errors were encountered:
This is a normal behaviour using the key; the component will not be re-mounted when its arguments are changed. You can force it to be re-mounted by changing dynamically the key value. It will update the config with the right dropdown fields, but it will also reset the tree.
When setting a key for the condition_tree(), upon rerunning the app and updating the config (i.e. table changes), the dropdown of available fields does not change. Even deleting the session state key before calling condition_tree() does not change the available fields.
Code:
Basically, even if my table changes in this code, the condition tree will still hold on to the old config. This does not happen when not using a key. My intention with using the key is to be able to save the query and recall it at a different time.
The text was updated successfully, but these errors were encountered: