Skip to content

Commit 0e4c6d7

Browse files
Merge pull request #695 from layer5io/revert-693-table/tooltip
Revert "Add `customtooltip` as default for tables and fix around it"
2 parents 0727b3e + 6978600 commit 0e4c6d7

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

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-
<div>{children}</div>
53+
{children}
5454
</Tooltip>
5555
);
5656
}

src/custom/ResponsiveDataTable.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
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';
54

65
const dataTableTheme = (theme: Theme) =>
76
createTheme({
8-
...theme,
97
components: {
10-
...theme.components,
118
MuiTable: {
129
styleOverrides: {
1310
root: {
@@ -261,10 +258,7 @@ const ResponsiveDataTable = ({
261258
columns={tableCols ?? []}
262259
data={data || []}
263260
title={undefined}
264-
components={{
265-
Tooltip: CustomTooltip as unknown as React.ReactNode,
266-
...components
267-
}}
261+
components={components}
268262
options={updatedOptions}
269263
{...props}
270264
/>

0 commit comments

Comments
 (0)