0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Fixed save button not working when nothing changed (#17709)

no issue
This commit is contained in:
Jono M 2023-08-14 09:43:59 +01:00 committed by GitHub
parent 255466ec12
commit fcb0ae48b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,7 +34,6 @@ const useSettingGroup = (): SettingGroupHook => {
initialState: settings || [],
onSave: async () => {
await editSettings?.(changedSettings());
setEditing(false);
}
});
@ -92,7 +91,11 @@ const useSettingGroup = (): SettingGroupHook => {
saveState,
focusRef,
siteData,
handleSave,
handleSave: () => {
const result = handleSave();
setEditing(false);
return result;
},
handleCancel,
updateSetting,
handleEditingChange