remove tooltip
This commit is contained in:
parent
a6d51567b7
commit
d46f7ab708
3 changed files with 6 additions and 8 deletions
|
|
@ -17,7 +17,7 @@ export default function TableOptions({
|
||||||
stateChange: boolean;
|
stateChange: boolean;
|
||||||
}): JSX.Element {
|
}): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<div className={cn("absolute bottom-4 left-6")}>
|
<div className={cn("absolute bottom-3 left-6")}>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<div>
|
<div>
|
||||||
<ShadTooltip content="Reset Columns">
|
<ShadTooltip content="Reset Columns">
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@ import { cn, toTitleCase } from "../../utils/utils";
|
||||||
import ForwardedIconComponent from "../genericIconComponent";
|
import ForwardedIconComponent from "../genericIconComponent";
|
||||||
import { Alert, AlertDescription, AlertTitle } from "../ui/alert";
|
import { Alert, AlertDescription, AlertTitle } from "../ui/alert";
|
||||||
import TableOptions from "./components/TableOptions";
|
import TableOptions from "./components/TableOptions";
|
||||||
import resetGrid from "./utils/reset-grid-columns";
|
|
||||||
import { useParams } from "react-router-dom";
|
import { useParams } from "react-router-dom";
|
||||||
|
import resetGrid from "./utils/reset-grid-columns";
|
||||||
|
|
||||||
interface TableComponentProps extends AgGridReactProps {
|
interface TableComponentProps extends AgGridReactProps {
|
||||||
columnDefs: NonNullable<AgGridReactProps["columnDefs"]>;
|
columnDefs: NonNullable<AgGridReactProps["columnDefs"]>;
|
||||||
|
|
@ -128,7 +128,7 @@ const TableComponent = forwardRef<
|
||||||
>
|
>
|
||||||
<AgGridReact
|
<AgGridReact
|
||||||
{...props}
|
{...props}
|
||||||
className={cn(props.className, "custom-scroll")}
|
className={cn(props.className, "cusm-scroll")}
|
||||||
defaultColDef={{
|
defaultColDef={{
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
|
|
@ -153,6 +153,7 @@ const TableComponent = forwardRef<
|
||||||
duplicateRow={props.onDuplicate ? props.onDuplicate : undefined}
|
duplicateRow={props.onDuplicate ? props.onDuplicate : undefined}
|
||||||
deleteRow={props.onDelete ? props.onDelete : undefined}
|
deleteRow={props.onDelete ? props.onDelete : undefined}
|
||||||
resetGrid={() => {
|
resetGrid={() => {
|
||||||
|
console.log("teste");
|
||||||
resetGrid(realRef, initialColumnDefs);
|
resetGrid(realRef, initialColumnDefs);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setColumnStateChange(false);
|
setColumnStateChange(false);
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ const useColumnDefs = (
|
||||||
myData: any,
|
myData: any,
|
||||||
handleOnNewValue: (newValue: any, name: string) => void,
|
handleOnNewValue: (newValue: any, name: string) => void,
|
||||||
changeAdvanced: (n: string) => void,
|
changeAdvanced: (n: string) => void,
|
||||||
open: boolean
|
open: boolean,
|
||||||
) => {
|
) => {
|
||||||
const columnDefs: ColDef[] = useMemo(
|
const columnDefs: ColDef[] = useMemo(
|
||||||
() => [
|
() => [
|
||||||
|
|
@ -23,8 +23,6 @@ const useColumnDefs = (
|
||||||
: templateParam.name) ?? params.data.key
|
: templateParam.name) ?? params.data.key
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
tooltipField: "display_name",
|
|
||||||
tooltipComponent: TableTooltipRender,
|
|
||||||
wrapText: true,
|
wrapText: true,
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
flex: 1,
|
flex: 1,
|
||||||
|
|
@ -35,7 +33,6 @@ const useColumnDefs = (
|
||||||
headerName: "Description",
|
headerName: "Description",
|
||||||
field: "info",
|
field: "info",
|
||||||
tooltipField: "info",
|
tooltipField: "info",
|
||||||
tooltipComponent: TableTooltipRender,
|
|
||||||
wrapText: true,
|
wrapText: true,
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
flex: 2,
|
flex: 2,
|
||||||
|
|
@ -81,7 +78,7 @@ const useColumnDefs = (
|
||||||
cellClass: "no-border",
|
cellClass: "no-border",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[open, myData]
|
[open, myData],
|
||||||
);
|
);
|
||||||
|
|
||||||
return columnDefs;
|
return columnDefs;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue