0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

Handle no-change saves in AdminX

refs. https://github.com/TryGhost/Team/issues/3150
This commit is contained in:
Peter Zimon 2023-05-25 17:12:35 +02:00
parent 0a02768ec1
commit b99cf16753
2 changed files with 4 additions and 2 deletions

View file

@ -42,7 +42,7 @@ const Modal: React.FC<ModalProps> = ({size = 'md', title, okLabel, cancelLabel,
});
}
let modalStyles = 'relative z-50 mx-auto flex flex-col justify-between bg-white shadow-xl w-full';
let modalStyles = 'relative rounded overflow-hidden z-50 mx-auto flex flex-col justify-between bg-white shadow-xl w-full';
let backdropStyles = 'fixed inset-0 h-[100vh] w-[100vw] overflow-y-scroll ';
switch (size) {

View file

@ -82,7 +82,9 @@ const useSettingGroup = (): SettingGroupHook => {
value: setting.value
};
});
saveSettings?.(changedSettings);
if (changedSettings.length) {
saveSettings?.(changedSettings);
}
setCurrentState('view');
};