Skip to content

Condition Tree does not accept updated config when using a key #7

@matt-gree

Description

@matt-gree

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions