Added a prop for enabling horizontal scroll

refs PROD-332
This commit is contained in:
Djordje Vlaisavljevic 2024-01-23 11:31:59 +00:00
parent e2a4724792
commit 7d9dfac489

View File

@ -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<TableProps> = ({
showMore,
isLoading,
fillContainer = false,
horizontalScroll = false,
paddingXClassName
}) => {
const table = React.useRef<HTMLTableSectionElement>(null);
@ -145,7 +147,7 @@ const Table: React.FC<TableProps> = ({
);
const mainContainerClasses = clsx(
'overflow-x-auto',
horizontalScroll ? 'overflow-x-auto' : '',
fillContainer ? 'absolute inset-0 min-w-full' : 'w-full'
);