diff --git a/vizro-core/examples/_dev/app.py b/vizro-core/examples/_dev/app.py index dbf22a771..2824bde9a 100644 --- a/vizro-core/examples/_dev/app.py +++ b/vizro-core/examples/_dev/app.py @@ -1,11 +1,10 @@ """Rough example used by developers.""" -from dash import Output, State from typing import Any, Dict, List, Optional import vizro.models as vm import vizro.plotly.express as px -from dash import Output +from dash import Output, State from vizro import Vizro from vizro.actions import export_data, filter_interaction from vizro.managers._model_manager import ModelID @@ -48,8 +47,10 @@ def overwritten_filter_interactions_1( **filter_interaction.pure_function(targets=targets, **inputs), } + # 2. Overwriting the filter_interaction action by inheriting FilterInteractionAction + # This also works: # from vizro.actions.filter_interaction_action import FilterInteractionAction # class OverwrittenFilterInteractions2(FilterInteractionAction): @@ -99,8 +100,8 @@ def outputs(self): # targets=[ # "scatter", # "scatter_from_page_2", - # ] - # ) + # ] + # ) # ), # Implementing updating card with grid clicked data as the independent action. # vm.Action( diff --git a/vizro-core/src/vizro/actions/_actions_utils.py b/vizro-core/src/vizro/actions/_actions_utils.py index 2b6d4160f..26c3274c2 100644 --- a/vizro-core/src/vizro/actions/_actions_utils.py +++ b/vizro-core/src/vizro/actions/_actions_utils.py @@ -55,7 +55,7 @@ def _apply_filters(data_frame: pd.DataFrame, ctds_filters: List[CallbackTriggerD for action in selector_actions: # TODO-AV2: Handle if "action.function != "filter_action" until inputs refactoring - if (target not in action.function.targets or ALL_OPTION in selector_value): + if target not in action.function.targets or ALL_OPTION in selector_value: continue _filter_function = action.function["filter_function"]