From 012bee4223c5e470011ce09dcec33936fffc1095 Mon Sep 17 00:00:00 2001 From: Hatim Dinia <33469289+hdinia@users.noreply.github.com> Date: Fri, 31 May 2024 13:38:18 +0200 Subject: [PATCH] fix(ui): prevent `CreateVariantDialog` fields overflow (#2044) (cherry picked from commit 4665e889ff162e472b7a9ec7801d9ddb74aeec4a) --- docs/CHANGELOG.md | 1 + .../HomeView/InformationView/CreateVariantDialog.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index f9fca0612e..fb6cfc95f8 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -11,6 +11,7 @@ v2.17.1 (2024-05-29) * **ui-utils:** add overload signatures for validateNumber function in validationUtils [`#2029`](https://github.com/AntaresSimulatorTeam/AntaREST/pull/2029) * **desktop**: update Antares Web Desktop version [`#2036`](https://github.com/AntaresSimulatorTeam/AntaREST/pull/2036) * **ui:** add studies "archive" tag [`#2043`](https://github.com/AntaresSimulatorTeam/AntaREST/pull/2043) +* **ui:** prevent `CreateVariantDialog` fields overflow [`#2044`](https://github.com/AntaresSimulatorTeam/AntaREST/pull/2043) ### Bug Fixes diff --git a/webapp/src/components/App/Singlestudy/HomeView/InformationView/CreateVariantDialog.tsx b/webapp/src/components/App/Singlestudy/HomeView/InformationView/CreateVariantDialog.tsx index 5e7c1213f7..9d46ac4550 100644 --- a/webapp/src/components/App/Singlestudy/HomeView/InformationView/CreateVariantDialog.tsx +++ b/webapp/src/components/App/Singlestudy/HomeView/InformationView/CreateVariantDialog.tsx @@ -44,7 +44,7 @@ function CreateVariantDialog(props: Props) { return createVariant(sourceId, name); }; - const handleSubmitSuccessful = async ( + const handleSubmitSuccessful = ( data: SubmitHandlerPlus, variantId: string, ) => { @@ -58,6 +58,7 @@ function CreateVariantDialog(props: Props) { return ( {({ control }) => ( -
+
({ label: ver.name, value: ver.id,