We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent edeb72d commit 6a4fcfbCopy full SHA for 6a4fcfb
packages/app/src/app/pages/common/Modals/ShareModal2/index.tsx
@@ -112,7 +112,16 @@ function ShareModal() {
112
});
113
114
const change = property => {
115
- setSettings({ ...settings, preset: 'custom', ...property });
+ setSettings(currentSettings => {
116
+ // set new property in settings
117
+ const newSettings = { ...currentSettings, ...property };
118
+
119
+ // if the property is part of a preset options (not global options),
120
+ // then change preset to custom
121
+ if (!(property in globalOptions)) newSettings.preset = 'custom';
122
123
+ return newSettings;
124
+ });
125
};
126
127
const toggle = property => {
0 commit comments