Skip to content

Commit

Permalink
Added the dependency for useCallback in onChageInSelect function (mat…
Browse files Browse the repository at this point in the history
…termost-community#2905)

Co-authored-by: Rajat Dabade <rajat@Rajats-MacBook-Pro.local>
  • Loading branch information
Rajat-Dabade and Rajat Dabade authored Apr 22, 2022
1 parent f439e34 commit eace2da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webapp/src/components/propertyValueElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down

0 comments on commit eace2da

Please sign in to comment.