From 4644b1c200007269717d94b7ee020d2654b98d5a Mon Sep 17 00:00:00 2001 From: Yunus M Date: Tue, 5 Dec 2023 16:09:50 +0530 Subject: [PATCH] fix: custom variables options are not populated (#4154) --- .../DashboardVariablesSelection/VariableItem.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/frontend/src/container/NewDashboard/DashboardVariablesSelection/VariableItem.tsx b/frontend/src/container/NewDashboard/DashboardVariablesSelection/VariableItem.tsx index 4e81b0b116..408605a89b 100644 --- a/frontend/src/container/NewDashboard/DashboardVariablesSelection/VariableItem.tsx +++ b/frontend/src/container/NewDashboard/DashboardVariablesSelection/VariableItem.tsx @@ -224,6 +224,14 @@ function VariableItem({ // eslint-disable-next-line react-hooks/exhaustive-deps }, [debouncedVariableValue]); + useEffect(() => { + // Fetch options for CUSTOM Type + if (variableData.type === 'CUSTOM') { + getOptions(null); + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + return (