diff --git a/src/lib/components/table/Table.stories.tsx b/src/lib/components/table/Table.stories.tsx index 7a410af7..258a33d5 100644 --- a/src/lib/components/table/Table.stories.tsx +++ b/src/lib/components/table/Table.stories.tsx @@ -206,6 +206,9 @@ const story = { hideColumns: { subContent: 'This property allows to hide defined columns by index.', }, + modalContentRenderer: { + subContent: 'This property allows to render custom modal content.', + }, onSelectionChanged: { subContent: 'This event is triggered when a selection is changed. It receives the index of the selection as an argument.', diff --git a/src/lib/components/table/Table.tsx b/src/lib/components/table/Table.tsx index a3ca2f05..24f6c914 100644 --- a/src/lib/components/table/Table.tsx +++ b/src/lib/components/table/Table.tsx @@ -33,6 +33,7 @@ export interface TableProps { hideColumns?: number[]; hideDetails?: boolean; imageComponent?: (args: any) => JSX.Element; + modalContentRenderer?: (content: ReactNode) => ReactNode; onModalOpen?: ModalFunction; onSelectionChanged?: (index: number) => void; stickyHeaderTopOffset?: number; @@ -53,6 +54,7 @@ const Table = ({ hideColumns = [], hideDetails, imageComponent, + modalContentRenderer, onModalOpen, onSelectionChanged, stickyHeaderTopOffset = 0, @@ -185,7 +187,11 @@ const Table = ({ title={infoModalData?.title} onClose={() => setInfoModalData(null)} > -