Added the dependency for useCallback in onChageInSelect function (#2905)

Co-authored-by: Rajat Dabade <rajat@Rajats-MacBook-Pro.local>
This commit is contained in:
Rajat Dabade 2022-04-22 22:11:07 +05:30 committed by GitHub
parent f439e3474d
commit eace2da582
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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])