Skip to content

Commit 0827b88

Browse files
Merge branch 'master' into column/visibililty
2 parents 17c4225 + 47ac900 commit 0827b88

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/custom/CustomTooltip/customTooltip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function CustomTooltip({
5050
onClick={onClick}
5151
{...props}
5252
>
53-
{children}
53+
<div>{children}</div>
5454
</Tooltip>
5555
);
5656
}

src/custom/ResponsiveDataTable.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import { Theme, ThemeProvider, createTheme } from '@mui/material';
22
import MUIDataTable from 'mui-datatables';
33
import React, { useCallback } from 'react';
4+
import { CustomTooltip } from './CustomTooltip';
45

56
const dataTableTheme = (theme: Theme) =>
67
createTheme({
8+
...theme,
79
components: {
10+
...theme.components,
811
MuiTable: {
912
styleOverrides: {
1013
root: {
@@ -258,7 +261,10 @@ const ResponsiveDataTable = ({
258261
columns={tableCols ?? []}
259262
data={data || []}
260263
title={undefined}
261-
components={components}
264+
components={{
265+
Tooltip: CustomTooltip as unknown as React.ReactNode,
266+
...components
267+
}}
262268
options={updatedOptions}
263269
{...props}
264270
/>

0 commit comments

Comments
 (0)