From ba24d834925f3d66d875ae601e80a60cf03110cc Mon Sep 17 00:00:00 2001 From: Matjaž Črnko Date: Mon, 22 Jan 2024 21:06:27 +0100 Subject: fix: SelectField default to null value and fix emptyTitle --- modern/src/settings/ComputedAttributePage.jsx | 2 +- modern/src/settings/DevicePage.jsx | 4 ++-- modern/src/settings/GeofencePage.jsx | 2 +- modern/src/settings/GroupPage.jsx | 2 +- modern/src/settings/NotificationPage.jsx | 6 +++--- modern/src/settings/PreferencesPage.jsx | 2 +- modern/src/settings/ServerPage.jsx | 2 +- modern/src/settings/UserPage.jsx | 2 +- modern/src/settings/components/BaseCommandView.jsx | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) (limited to 'modern/src/settings') diff --git a/modern/src/settings/ComputedAttributePage.jsx b/modern/src/settings/ComputedAttributePage.jsx index f7ffe36e..e3a5e5a2 100644 --- a/modern/src/settings/ComputedAttributePage.jsx +++ b/modern/src/settings/ComputedAttributePage.jsx @@ -156,7 +156,7 @@ const ComputedAttributePage = () => { setDeviceId(Number(e.target.value))} endpoint="/api/devices" label={t('sharedDevice')} diff --git a/modern/src/settings/DevicePage.jsx b/modern/src/settings/DevicePage.jsx index c775f75e..72624270 100644 --- a/modern/src/settings/DevicePage.jsx +++ b/modern/src/settings/DevicePage.jsx @@ -103,7 +103,7 @@ const DevicePage = () => { setItem({ ...item, groupId: Number(event.target.value) })} endpoint="/api/groups" label={t('groupParent')} @@ -133,7 +133,7 @@ const DevicePage = () => { label={t('deviceCategory')} /> setItem({ ...item, calendarId: Number(event.target.value) })} endpoint="/api/calendars" label={t('sharedCalendar')} diff --git a/modern/src/settings/GeofencePage.jsx b/modern/src/settings/GeofencePage.jsx index 174bdfb1..1d9e614b 100644 --- a/modern/src/settings/GeofencePage.jsx +++ b/modern/src/settings/GeofencePage.jsx @@ -76,7 +76,7 @@ const GeofencePage = () => { label={t('sharedDescription')} /> setItem({ ...item, calendarId: Number(event.target.value) })} endpoint="/api/calendars" label={t('sharedCalendar')} diff --git a/modern/src/settings/GroupPage.jsx b/modern/src/settings/GroupPage.jsx index b54e3b7f..64498b9c 100644 --- a/modern/src/settings/GroupPage.jsx +++ b/modern/src/settings/GroupPage.jsx @@ -81,7 +81,7 @@ const GroupPage = () => { setItem({ ...item, groupId: Number(event.target.value) })} endpoint="/api/groups" label={t('groupParent')} diff --git a/modern/src/settings/NotificationPage.jsx b/modern/src/settings/NotificationPage.jsx index 53eea8ae..44399f92 100644 --- a/modern/src/settings/NotificationPage.jsx +++ b/modern/src/settings/NotificationPage.jsx @@ -73,7 +73,7 @@ const NotificationPage = () => { setItem({ ...item, type: e.target.value })} endpoint="/api/notifications/types" keyGetter={(it) => it.type} @@ -101,7 +101,7 @@ const NotificationPage = () => { /> {item.notificators?.includes('command') && ( setItem({ ...item, commandId: Number(event.target.value) })} endpoint="/api/commands" titleGetter={(it) => it.description} @@ -137,7 +137,7 @@ const NotificationPage = () => { setItem({ ...item, calendarId: Number(event.target.value) })} endpoint="/api/calendars" label={t('sharedCalendar')} diff --git a/modern/src/settings/PreferencesPage.jsx b/modern/src/settings/PreferencesPage.jsx index aaa99645..cfdcf885 100644 --- a/modern/src/settings/PreferencesPage.jsx +++ b/modern/src/settings/PreferencesPage.jsx @@ -271,7 +271,7 @@ const PreferencesPage = () => { label={t('devicePrimaryInfo')} /> setAttributes({ ...attributes, deviceSecondary: e.target.value })} data={deviceFields} titleGetter={(it) => t(it.name)} diff --git a/modern/src/settings/ServerPage.jsx b/modern/src/settings/ServerPage.jsx index eb7c7ac0..1020092b 100644 --- a/modern/src/settings/ServerPage.jsx +++ b/modern/src/settings/ServerPage.jsx @@ -193,7 +193,7 @@ const ServerPage = () => { 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 8a61b3b7..f276beca 100644 --- a/modern/src/settings/UserPage.jsx +++ b/modern/src/settings/UserPage.jsx @@ -267,7 +267,7 @@ const UserPage = () => { setItem({ ...item, attributes: { ...item.attributes, timezone: e.target.value } })} endpoint="/api/server/timezones" keyGetter={(it) => it} diff --git a/modern/src/settings/components/BaseCommandView.jsx b/modern/src/settings/components/BaseCommandView.jsx index f4d5d4b2..bb70c3b9 100644 --- a/modern/src/settings/components/BaseCommandView.jsx +++ b/modern/src/settings/components/BaseCommandView.jsx @@ -28,7 +28,7 @@ const BaseCommandView = ({ deviceId, item, setItem }) => { return ( <> setItem({ ...item, type: e.target.value, attributes: {} })} endpoint={deviceId ? `/api/commands/types?${new URLSearchParams({ deviceId }).toString()}` : '/api/commands/types'} keyGetter={(it) => it.type} -- cgit v1.2.3