Skip to content

Commit

Permalink
fix: do not show pointer if no row click (#28)
Browse files Browse the repository at this point in the history
* fix: do not show pointer cursor if we don't have callback

gisce/webclient#1368

* fix: adjustments in showPointerCursorInRows

* fix: adjustments in showPointerCursorInRows
gisce/webclient#1368
  • Loading branch information
mguellsegarra authored Nov 15, 2024
1 parent 51f41ac commit 324f18a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/InfiniteTable/InfiniteTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export type InfiniteTableProps = Omit<
onRowStatus?: (item: any) => any;
statusComponent?: (status: any) => ReactNode;
strings?: Record<string, string>;
showPointerCursorInRows?: boolean;
};

export type InfiniteTableRef = {
Expand Down Expand Up @@ -91,6 +92,7 @@ const InfiniteTableComp = forwardRef<InfiniteTableRef, InfiniteTableProps>(
statusComponent,
hasStatusColumn = false,
strings = {},
showPointerCursorInRows = true,
} = props;

const gridRef = useRef<AgGridReact>(null);
Expand Down Expand Up @@ -478,9 +480,9 @@ const InfiniteTableComp = forwardRef<InfiniteTableRef, InfiniteTableProps>(

const rowStyle = useMemo(() => {
return {
cursor: "pointer",
cursor: showPointerCursorInRows ? "pointer" : "default",
};
}, []);
}, [showPointerCursorInRows]);

return (
<div
Expand Down

0 comments on commit 324f18a

Please sign in to comment.