0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -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 || [], initialState: settings || [],
onSave: async () => { onSave: async () => {
await editSettings?.(changedSettings()); await editSettings?.(changedSettings());
setEditing(false);
} }
}); });
@ -92,7 +91,11 @@ const useSettingGroup = (): SettingGroupHook => {
saveState, saveState,
focusRef, focusRef,
siteData, siteData,
handleSave, handleSave: () => {
const result = handleSave();
setEditing(false);
return result;
},
handleCancel, handleCancel,
updateSetting, updateSetting,
handleEditingChange handleEditingChange