mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE-Storyless): add footer rendering support to Table component
This commit is contained in:
@@ -75,6 +75,8 @@ export interface TableProps<TData extends object> {
|
||||
column: Column<TData, unknown>,
|
||||
headerGroup: HeaderGroup<TData>
|
||||
) => ReactNode;
|
||||
renderFooter?: boolean;
|
||||
footerContent?: ReactNode;
|
||||
}
|
||||
|
||||
const DUMMY_SKELETON_DATA = [{}, {}, {}, {}, {}];
|
||||
@@ -121,6 +123,8 @@ const Table = <TData extends object>({
|
||||
customHeaderRows = [],
|
||||
renderCustomHeaders = false,
|
||||
onCustomHeaderCellRender,
|
||||
renderFooter = false,
|
||||
footerContent,
|
||||
}: TableProps<TData>) => {
|
||||
const isServerSideTable =
|
||||
totalItems !== undefined &&
|
||||
@@ -327,6 +331,8 @@ const Table = <TData extends object>({
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
|
||||
{renderFooter && footerContent}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user