Skip to content

The open alternative to Salesforce, designed for AI.

fix: prevent non-boolean 'active' prop from being forwarded to DOM (#8534)

Harsh Singh9134ed8ce46d
diff --git a/packages/twenty-front/src/modules/ui/layout/tab/components/Tab.tsx b/packages/twenty-front/src/modules/ui/layout/tab/components/Tab.tsx
index 987eea1706b..af965ce982c 100644
--- a/packages/twenty-front/src/modules/ui/layout/tab/components/Tab.tsx
+++ b/packages/twenty-front/src/modules/ui/layout/tab/components/Tab.tsx
@@ -1,3 +1,4 @@
+import isPropValid from '@emotion/is-prop-valid';
import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import { ReactElement } from 'react';
@@ -16,11 +17,9 @@ type TabProps = {
to?: string;
};
-const StyledTab = styled.button<{
- active?: boolean;
- disabled?: boolean;
- to?: string;
-}>`
+const StyledTab = styled('button', {
+ shouldForwardProp: (prop) => isPropValid(prop) && prop !== 'active',
+})<{ active?: boolean; disabled?: boolean; to?: string }>`
align-items: center;
border-bottom: 1px solid ${({ theme }) => theme.border.color.light};
border-color: ${({ theme, active }) =>