From 69786007949264bac438db2670df3af65a1f68d0 Mon Sep 17 00:00:00 2001
From: Rudraksh Tyagi <59254790+dragon-slayer875@users.noreply.github.com>
Date: Tue, 30 Jul 2024 22:12:55 +0530
Subject: [PATCH] Revert "Add `customtooltip` as default for tables and fix
around it"
---
src/custom/CustomTooltip/customTooltip.tsx | 2 +-
src/custom/ResponsiveDataTable.tsx | 8 +-------
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/custom/CustomTooltip/customTooltip.tsx b/src/custom/CustomTooltip/customTooltip.tsx
index 356f4bd6..8668767f 100644
--- a/src/custom/CustomTooltip/customTooltip.tsx
+++ b/src/custom/CustomTooltip/customTooltip.tsx
@@ -50,7 +50,7 @@ function CustomTooltip({
onClick={onClick}
{...props}
>
-
{children}
+ {children}
);
}
diff --git a/src/custom/ResponsiveDataTable.tsx b/src/custom/ResponsiveDataTable.tsx
index bb091476..381af44f 100644
--- a/src/custom/ResponsiveDataTable.tsx
+++ b/src/custom/ResponsiveDataTable.tsx
@@ -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: {
@@ -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}
/>