Editing a collection with a mask text field causes the collection document to be marked as dirty.
Payload will ask if we want to stay on the page or discard the changes.
The problem lies in the onAccept callback that is triggered when the field value is loaded.
Here's how I fix it:
onAccept={newValue => newValue !== value && setValue(newValue)}
Editing a collection with a mask text field causes the collection document to be marked as dirty. Payload will ask if we want to stay on the page or discard the changes.
The problem lies in the onAccept callback that is triggered when the field value is loaded.
Here's how I fix it: