From f078a1aa3b82ab7b95f11136aadc131135a52be0 Mon Sep 17 00:00:00 2001 From: Maxime Lalo Date: Tue, 18 Apr 2023 11:11:50 +0200 Subject: [PATCH 1/2] :bug: Fixing animation on textarea placeholder --- .../DesignSystem/Form/Elements/InputField/classes.module.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/front/Components/DesignSystem/Form/Elements/InputField/classes.module.scss b/src/front/Components/DesignSystem/Form/Elements/InputField/classes.module.scss index 7b70c608..4130e5ef 100644 --- a/src/front/Components/DesignSystem/Form/Elements/InputField/classes.module.scss +++ b/src/front/Components/DesignSystem/Form/Elements/InputField/classes.module.scss @@ -111,6 +111,7 @@ position: absolute; background: $white; transform: translateY(35px); + transition: transform 0.3s ease-in-out; } &:focus { From d766113f69a9a783f8c2eca3d5a77ff813ee63a6 Mon Sep 17 00:00:00 2001 From: Maxime Lalo Date: Tue, 18 Apr 2023 11:19:20 +0200 Subject: [PATCH 2/2] :sparkles: Fixing select --- .../Components/DesignSystem/Select/index.tsx | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/front/Components/DesignSystem/Select/index.tsx b/src/front/Components/DesignSystem/Select/index.tsx index 3c0453c7..9a389c2d 100644 --- a/src/front/Components/DesignSystem/Select/index.tsx +++ b/src/front/Components/DesignSystem/Select/index.tsx @@ -26,6 +26,7 @@ type IState = { isOpen: boolean; listWidth: number; listHeight: number; + selectedOption: IOption | null; }; export default class Select extends React.Component { @@ -39,13 +40,14 @@ export default class Select extends React.Component { isOpen: false, listHeight: 0, listWidth: 0, + selectedOption: null, }; this.toggle = this.toggle.bind(this); this.onSelect = this.onSelect.bind(this); } public override render(): JSX.Element { - const selectedOption = this.props.selectedOption; + const selectedOption = this.state.selectedOption ?? this.props.selectedOption; return (