You've already forked focalboard
mirror of
https://github.com/mattermost/focalboard.git
synced 2025-09-16 08:56:19 +02:00
disable patches on read-only unmount (#4608)
This commit is contained in:
@@ -35,11 +35,14 @@ const URLProperty = (props: PropertyProps): JSX.Element => {
|
||||
if (value !== (props.card.fields.properties[props.propertyTemplate?.id || ''] || '')) {
|
||||
mutator.changePropertyValue(props.board.id, props.card, props.propertyTemplate?.id || '', value)
|
||||
}
|
||||
}, [props.card, props.propertyTemplate, value])
|
||||
}, [props.board.id, props.card, props.propertyTemplate?.id, value])
|
||||
|
||||
const saveTextPropertyRef = useRef<() => void>(saveTextProperty)
|
||||
saveTextPropertyRef.current = saveTextProperty
|
||||
|
||||
if (props.readOnly) {
|
||||
saveTextPropertyRef.current = () => null
|
||||
} else {
|
||||
saveTextPropertyRef.current = saveTextProperty
|
||||
}
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
saveTextPropertyRef.current && saveTextPropertyRef.current()
|
||||
|
Reference in New Issue
Block a user