From e0a81038cd62bcea91e298b516892ecd34a5a0b0 Mon Sep 17 00:00:00 2001 From: fallenbagel <98979876+fallenbagel@users.noreply.github.com> Date: Sun, 11 Jan 2026 23:17:47 +0500 Subject: [PATCH] fix(plex-settings): fix Plex preset selection not enabling save button (#2289) Uses setValues instead of setFieldValue calls to properly trigger the validation and also added a validateOnMOunt to ensure form validity is checked on initial render. fix #2287 --- src/components/Settings/SettingsPlex.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/Settings/SettingsPlex.tsx b/src/components/Settings/SettingsPlex.tsx index b670d520..890c07d6 100644 --- a/src/components/Settings/SettingsPlex.tsx +++ b/src/components/Settings/SettingsPlex.tsx @@ -377,6 +377,7 @@ const SettingsPlex = ({ onComplete }: SettingsPlexProps) => { webAppUrl: data?.webAppUrl, }} validationSchema={PlexSettingsSchema} + validateOnMount={true} onSubmit={async (values) => { let toastId: string | null = null; try { @@ -423,6 +424,7 @@ const SettingsPlex = ({ onComplete }: SettingsPlexProps) => { values, handleSubmit, setFieldValue, + setValues, isSubmitting, isValid, }) => { @@ -445,9 +447,12 @@ const SettingsPlex = ({ onComplete }: SettingsPlexProps) => { availablePresets[Number(e.target.value)]; if (targPreset) { - setFieldValue('hostname', targPreset.address); - setFieldValue('port', targPreset.port); - setFieldValue('useSsl', targPreset.ssl); + setValues({ + ...values, + hostname: targPreset.address, + port: targPreset.port, + useSsl: targPreset.ssl, + }); } }} >