Skip to content

The open alternative to Salesforce, designed for AI.

input alignment fix (#10577)

nitin85bfd87bb4e5
diff --git a/packages/twenty-front/src/modules/ui/input/components/InputErrorHelper.tsx b/packages/twenty-front/src/modules/ui/input/components/InputErrorHelper.tsx
index 2f15b31a778..1a8a38f0e49 100644
--- a/packages/twenty-front/src/modules/ui/input/components/InputErrorHelper.tsx
+++ b/packages/twenty-front/src/modules/ui/input/components/InputErrorHelper.tsx
@@ -1,5 +1,5 @@
-import React from 'react';
import styled from '@emotion/styled';
+import React from 'react';
const StyledInputErrorHelper = styled.div`
color: ${({ theme }) => theme.color.red};
@@ -13,13 +13,11 @@ const StyledErrorContainer = styled.div`
export const InputErrorHelper = ({
children,
- isVisible = true,
}: {
children?: React.ReactNode;
- isVisible?: boolean;
}) => (
<StyledErrorContainer>
- {children && isVisible && (
+ {children && (
<StyledInputErrorHelper aria-live="polite">
{children}
</StyledInputErrorHelper>
diff --git a/packages/twenty-front/src/modules/ui/input/components/TextInputV2.tsx b/packages/twenty-front/src/modules/ui/input/components/TextInputV2.tsx
index 19bb2273df8..a152959e0d5 100644
--- a/packages/twenty-front/src/modules/ui/input/components/TextInputV2.tsx
+++ b/packages/twenty-front/src/modules/ui/input/components/TextInputV2.tsx
@@ -357,7 +357,9 @@ const TextInputV2Component = forwardRef<
)}
</StyledTrailingIconContainer>
</StyledInputContainer>
- <InputErrorHelper isVisible={!noErrorHelper}>{error}</InputErrorHelper>
+ {!noErrorHelper && error && (
+ <InputErrorHelper>{error}</InputErrorHelper>
+ )}
</StyledContainer>
);
},