Skip to content

Commit

Permalink
Merge pull request #695 from layer5io/revert-693-table/tooltip
Browse files Browse the repository at this point in the history
Revert "Add `customtooltip` as default for tables and fix around it"
  • Loading branch information
sudhanshutech authored Jul 30, 2024
2 parents 0727b3e + 6978600 commit 0e4c6d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/custom/CustomTooltip/customTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function CustomTooltip({
onClick={onClick}
{...props}
>
<div>{children}</div>
{children}
</Tooltip>
);
}
Expand Down
8 changes: 1 addition & 7 deletions src/custom/ResponsiveDataTable.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import { Theme, ThemeProvider, createTheme } from '@mui/material';
import MUIDataTable from 'mui-datatables';
import React, { useCallback } from 'react';
import { CustomTooltip } from './CustomTooltip';

const dataTableTheme = (theme: Theme) =>
createTheme({
...theme,
components: {
...theme.components,
MuiTable: {
styleOverrides: {
root: {
Expand Down Expand Up @@ -261,10 +258,7 @@ const ResponsiveDataTable = ({
columns={tableCols ?? []}
data={data || []}
title={undefined}
components={{
Tooltip: CustomTooltip as unknown as React.ReactNode,
...components
}}
components={components}
options={updatedOptions}
{...props}
/>
Expand Down

0 comments on commit 0e4c6d7

Please sign in to comment.