mirror of
https://github.com/mattermost/focalboard.git
synced 2025-03-03 15:32:14 +02:00
Fix bug on save on unmount (#811)
* Fix tiny code order problem * Fixed #809
This commit is contained in:
parent
b0cf6d0d2f
commit
2f827ba5b4
@ -48,9 +48,11 @@ const PropertyValueElement = (props:Props): JSX.Element => {
|
||||
const finalDisplayValue = displayValue || emptyDisplayValue
|
||||
const [open, setOpen] = useState(false)
|
||||
|
||||
const editableFields: Array<PropertyType> = ['text', 'number', 'email', 'url', 'phone']
|
||||
|
||||
const saveTextProperty = useCallback(() => {
|
||||
if (editableFields.includes(props.propertyTemplate.type)) {
|
||||
if (value !== props.card.fields.properties[props.propertyTemplate.id] || '') {
|
||||
if (value !== (props.card.fields.properties[props.propertyTemplate.id] || '')) {
|
||||
mutator.changePropertyValue(card, propertyTemplate.id, value)
|
||||
}
|
||||
}
|
||||
@ -232,8 +234,6 @@ const PropertyValueElement = (props:Props): JSX.Element => {
|
||||
)
|
||||
}
|
||||
|
||||
const editableFields: Array<PropertyType> = ['text', 'number', 'email', 'url', 'phone']
|
||||
|
||||
if (
|
||||
editableFields.includes(propertyTemplate.type)
|
||||
) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user