From eace2da582c3dd57282006457e8acedf9dd504a6 Mon Sep 17 00:00:00 2001 From: Rajat Dabade Date: Fri, 22 Apr 2022 22:11:07 +0530 Subject: [PATCH] Added the dependency for useCallback in onChageInSelect function (#2905) Co-authored-by: Rajat Dabade --- webapp/src/components/propertyValueElement.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/src/components/propertyValueElement.tsx b/webapp/src/components/propertyValueElement.tsx index 3156a959b..0a96294ba 100644 --- a/webapp/src/components/propertyValueElement.tsx +++ b/webapp/src/components/propertyValueElement.tsx @@ -109,7 +109,7 @@ const PropertyValueElement = (props:Props): JSX.Element => { }) }, [board, props.board.id, card, propertyTemplate.id]) - const onChangeInSelect = useCallback((newValue) => mutator.changePropertyValue(props.board.id, card, propertyTemplate.id, newValue), []) + const onChangeInSelect = useCallback((newValue) => mutator.changePropertyValue(props.board.id, card, propertyTemplate.id, newValue), [props.board.id, card, propertyTemplate]) const onChangeColorInSelect = useCallback((option: IPropertyOption, colorId: string) => mutator.changePropertyOptionColor(board.id, board.cardProperties, propertyTemplate, option, colorId), [board, propertyTemplate]) const onDeleteOptionInSelect = useCallback((option: IPropertyOption) => mutator.deletePropertyOption(board.id, board.cardProperties, propertyTemplate, option), [board, propertyTemplate])