silverstripe-asset-admin icon indicating copy to clipboard operation
silverstripe-asset-admin copied to clipboard

STATE: UploadField with image always triggers "save" prompt

Open mikey-harveycameron opened this issue 2 years ago • 0 comments

The UploadField works fine except if an image exists, the form is always marked as dirty, even when nothing has changed. It means navigating away from the edit page always triggers an "Are you sure?" prompt.

Seems to be an issue with the getSchemaStateDefaults data passed to React, the react code assumes it is dirty and marks the form with the "changed" class.

mikey-harveycameron avatar Jan 23 '23 22:01 mikey-harveycameron