scaleflex / filerobot-image-editor

Edit, resize, and filter any image! Any questions or issues, please report to https://github.com/scaleflex/filerobot-image-editor/issues
MIT License
1.35k stars 342 forks source link

Config param "disableSaveIfNoChanges" working, but how to reset the change state after saving? #443

Closed software-mf closed 7 months ago

software-mf commented 7 months ago

Hello, I use the param

disableSaveIfNoChanges

in the configuration of Filerobot Image Editor to set the save button disabled until the first change on the image which works so far, but as soon if the callback

onsave

is called and the backend which saves the image data announces success I need a possibility to inform the editor that the save button has to be disabled again until the next change on the image.

Is there any way provided by your library to set the state to "saved" so that

a) the save button gets disabled and b) the undo history doesn't get lost

?

AhmeeedMostafa commented 7 months ago

Hey @software-mf currently we are using the history to determine whether we should disable the save button or not for performance reasons

so nothing to do about this for now unless we changed the architecture in the future