silverstripe / silverstripe-asset-admin

Silverstripe assets gallery for asset management
BSD 3-Clause "New" or "Revised" License
19 stars 78 forks source link

STATE: UploadField with image always triggers "save" prompt #1325

Open mikey-harveycameron opened 1 year ago

mikey-harveycameron commented 1 year ago

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.