Merge pull request #4535 from mattermost/save-date-on-close
GH-4475 - Save date change to database when closing form
This commit is contained in:
commit
bb5e6769b6
1 changed files with 3 additions and 2 deletions
|
@ -61,7 +61,6 @@ function DateRange(props: PropertyProps): JSX.Element {
|
|||
const onChange = useCallback((newValue) => {
|
||||
if (value !== newValue) {
|
||||
setValue(newValue)
|
||||
mutator.changePropertyValue(board.id, card, propertyTemplate.id, newValue)
|
||||
}
|
||||
}, [value, board.id, card, propertyTemplate.id])
|
||||
|
||||
|
@ -150,7 +149,9 @@ function DateRange(props: PropertyProps): JSX.Element {
|
|||
}
|
||||
|
||||
const onClose = () => {
|
||||
onChange(datePropertyToString(dateProperty))
|
||||
const newDate = datePropertyToString(dateProperty)
|
||||
onChange(newDate)
|
||||
mutator.changePropertyValue(board.id, card, propertyTemplate.id, newDate)
|
||||
setShowDialog(false)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue