From 7d9dfac48924a1c4a6c1eba60d43393dcc4c8490 Mon Sep 17 00:00:00 2001 From: Djordje Vlaisavljevic Date: Tue, 23 Jan 2024 11:31:59 +0000 Subject: [PATCH] Added a prop for enabling horizontal scroll refs PROD-332 --- apps/admin-x-design-system/src/global/Table.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/admin-x-design-system/src/global/Table.tsx b/apps/admin-x-design-system/src/global/Table.tsx index 96a1f0c63d..f6c23cca31 100644 --- a/apps/admin-x-design-system/src/global/Table.tsx +++ b/apps/admin-x-design-system/src/global/Table.tsx @@ -28,6 +28,7 @@ export interface TableProps { pagination?: PaginationData; showMore?: ShowMoreData; fillContainer?: boolean; + horizontalScroll?: boolean; paddingXClassName?: string; } @@ -65,6 +66,7 @@ const Table: React.FC = ({ showMore, isLoading, fillContainer = false, + horizontalScroll = false, paddingXClassName }) => { const table = React.useRef(null); @@ -145,7 +147,7 @@ const Table: React.FC = ({ ); const mainContainerClasses = clsx( - 'overflow-x-auto', + horizontalScroll ? 'overflow-x-auto' : '', fillContainer ? 'absolute inset-0 min-w-full' : 'w-full' );