aboutsummaryrefslogtreecommitdiff
path: root/modern
diff options
context:
space:
mode:
Diffstat (limited to 'modern')
-rw-r--r--modern/src/common/components/SelectField.jsx2
-rw-r--r--modern/src/settings/DevicePage.jsx1
-rw-r--r--modern/src/settings/NotificationPage.jsx3
-rw-r--r--modern/src/settings/PreferencesPage.jsx2
-rw-r--r--modern/src/settings/ServerPage.jsx1
-rw-r--r--modern/src/settings/UserPage.jsx1
6 files changed, 2 insertions, 8 deletions
diff --git a/modern/src/common/components/SelectField.jsx b/modern/src/common/components/SelectField.jsx
index 920c2640..3d25ca8e 100644
--- a/modern/src/common/components/SelectField.jsx
+++ b/modern/src/common/components/SelectField.jsx
@@ -9,7 +9,7 @@ const SelectField = ({
fullWidth,
multiple,
value,
- emptyValue = 0,
+ emptyValue = null,
emptyTitle = '\u00a0',
onChange,
endpoint,
diff --git a/modern/src/settings/DevicePage.jsx b/modern/src/settings/DevicePage.jsx
index 66a71cdb..c775f75e 100644
--- a/modern/src/settings/DevicePage.jsx
+++ b/modern/src/settings/DevicePage.jsx
@@ -125,7 +125,6 @@ const DevicePage = () => {
/>
<SelectField
value={item.category || 'default'}
- emptyValue={null}
onChange={(event) => setItem({ ...item, category: event.target.value })}
data={deviceCategories.map((category) => ({
id: category,
diff --git a/modern/src/settings/NotificationPage.jsx b/modern/src/settings/NotificationPage.jsx
index cfb908b5..53eea8ae 100644
--- a/modern/src/settings/NotificationPage.jsx
+++ b/modern/src/settings/NotificationPage.jsx
@@ -73,8 +73,7 @@ const NotificationPage = () => {
</AccordionSummary>
<AccordionDetails className={classes.details}>
<SelectField
- value={item.type}
- emptyValue={null}
+ value={item.type || null}
onChange={(e) => setItem({ ...item, type: e.target.value })}
endpoint="/api/notifications/types"
keyGetter={(it) => it.type}
diff --git a/modern/src/settings/PreferencesPage.jsx b/modern/src/settings/PreferencesPage.jsx
index 53d205f5..aaa99645 100644
--- a/modern/src/settings/PreferencesPage.jsx
+++ b/modern/src/settings/PreferencesPage.jsx
@@ -264,7 +264,6 @@ const PreferencesPage = () => {
</AccordionSummary>
<AccordionDetails className={classes.details}>
<SelectField
- emptyValue={null}
value={attributes.devicePrimary || 'name'}
onChange={(e) => setAttributes({ ...attributes, devicePrimary: e.target.value })}
data={deviceFields}
@@ -272,7 +271,6 @@ const PreferencesPage = () => {
label={t('devicePrimaryInfo')}
/>
<SelectField
- emptyValue={null}
value={attributes.deviceSecondary || null}
onChange={(e) => setAttributes({ ...attributes, deviceSecondary: e.target.value })}
data={deviceFields}
diff --git a/modern/src/settings/ServerPage.jsx b/modern/src/settings/ServerPage.jsx
index 09a02f91..eb7c7ac0 100644
--- a/modern/src/settings/ServerPage.jsx
+++ b/modern/src/settings/ServerPage.jsx
@@ -194,7 +194,6 @@ const ServerPage = () => {
</FormControl>
<SelectField
value={item.attributes.timezone || null}
- emptyValue={null}
onChange={(e) => setItem({ ...item, attributes: { ...item.attributes, timezone: e.target.value } })}
endpoint="/api/server/timezones"
keyGetter={(it) => it}
diff --git a/modern/src/settings/UserPage.jsx b/modern/src/settings/UserPage.jsx
index dee7f2ac..8a61b3b7 100644
--- a/modern/src/settings/UserPage.jsx
+++ b/modern/src/settings/UserPage.jsx
@@ -268,7 +268,6 @@ const UserPage = () => {
</FormControl>
<SelectField
value={(item.attributes && item.attributes.timezone) || null}
- emptyValue={null}
onChange={(e) => setItem({ ...item, attributes: { ...item.attributes, timezone: e.target.value } })}
endpoint="/api/server/timezones"
keyGetter={(it) => it}