1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-12-24 13:43:12 +02:00

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:
Scott Bishel 2023-02-07 10:52:32 -07:00 committed by GitHub
commit bb5e6769b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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