From d33c405441f782ebb72dc3373ba50c6576c0cbe0 Mon Sep 17 00:00:00 2001 From: Juraj Majerik Date: Wed, 24 Apr 2024 15:51:58 +0200 Subject: [PATCH] disable save btn until insight loaded --- frontend/src/scenes/experiments/ExperimentView/Goal.tsx | 7 ++++++- frontend/src/scenes/experiments/experimentLogic.tsx | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/scenes/experiments/ExperimentView/Goal.tsx b/frontend/src/scenes/experiments/ExperimentView/Goal.tsx index 651528abaf908..5ceadd7c28349 100644 --- a/frontend/src/scenes/experiments/ExperimentView/Goal.tsx +++ b/frontend/src/scenes/experiments/ExperimentView/Goal.tsx @@ -91,7 +91,9 @@ export function ExposureMetric({ experimentId }: { experimentId: Experiment['id' } export function ExperimentGoalModal({ experimentId }: { experimentId: Experiment['id'] }): JSX.Element { - const { experiment, isExperimentGoalModalOpen, experimentLoading } = useValues(experimentLogic({ experimentId })) + const { experiment, isExperimentGoalModalOpen, experimentLoading, goalInsightDataLoading } = useValues( + experimentLogic({ experimentId }) + ) const { closeExperimentGoalModal, updateExperimentGoal, setNewExperimentInsight } = useActions( experimentLogic({ experimentId }) ) @@ -108,6 +110,9 @@ export function ExperimentGoalModal({ experimentId }: { experimentId: Experiment Cancel { updateExperimentGoal(experiment.filters) diff --git a/frontend/src/scenes/experiments/experimentLogic.tsx b/frontend/src/scenes/experiments/experimentLogic.tsx index 6fa35bd318e8d..f0bff3999795f 100644 --- a/frontend/src/scenes/experiments/experimentLogic.tsx +++ b/frontend/src/scenes/experiments/experimentLogic.tsx @@ -106,6 +106,8 @@ export const experimentLogic = kea([ ['conversionMetrics'], trendsDataLogic({ dashboardItemId: EXPERIMENT_INSIGHT_ID }), ['results as trendResults'], + insightDataLogic({ dashboardItemId: EXPERIMENT_INSIGHT_ID }), + ['insightDataLoading as goalInsightDataLoading'], ], actions: [ experimentsLogic,