From fd9f0fb17ce07a310475a731efdd023f509f96d3 Mon Sep 17 00:00:00 2001 From: Prateek Shourya Date: Fri, 14 Jun 2024 16:45:06 +0530 Subject: [PATCH] [WEB-1607[ fix: state dropwdown default state. (#4816) --- web/core/components/dropdowns/state.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/core/components/dropdowns/state.tsx b/web/core/components/dropdowns/state.tsx index f20598488..179734680 100644 --- a/web/core/components/dropdowns/state.tsx +++ b/web/core/components/dropdowns/state.tsx @@ -77,7 +77,7 @@ export const StateDropdown: React.FC = observer((props) => { const { fetchProjectStates, getProjectStates, getStateById } = useProjectState(); const statesList = getProjectStates(projectId); const defaultState = statesList?.find((state) => state.default); - const stateValue = value ?? (showDefaultState ? defaultState?.id : undefined); + const stateValue = !!value ? value : showDefaultState ? defaultState?.id : undefined; const options = statesList?.map((state) => ({ value: state.id,