Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions packages/graph-explorer/src/components/Tabular/Tabular.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ const TabularContent = <T extends object>({
disablePagination,
disableStickyHeader,
fitRowsVertically,
rowSelectionMode,
onRowMouseOver,
onRowMouseOut,
variant,
Expand Down Expand Up @@ -235,7 +234,6 @@ const TabularContent = <T extends object>({
row={row}
tableInstance={tableInstance}
fitRowsVertically={fitRowsVertically}
rowSelectionMode={rowSelectionMode}
onMouseOver={onRowMouseOver}
onMouseOut={onRowMouseOut}
/>
Expand Down
10 changes: 3 additions & 7 deletions packages/graph-explorer/src/components/Tabular/TabularRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ import type { TabularProps } from "./Tabular";

const TabularRow = <T extends object>({
fitRowsVertically,
rowSelectionMode,
row,
tableInstance,
onMouseOver,
onMouseOut,
}: Pick<TabularProps<T>, "fitRowsVertically" | "rowSelectionMode"> & {
}: Pick<TabularProps<T>, "fitRowsVertically"> & {
tableInstance: TableInstance<T>;
row: Row<T>;
onMouseOver?(event: MouseEvent<HTMLDivElement>, row: Row<T>): void;
Expand Down Expand Up @@ -43,14 +42,11 @@ const TabularRow = <T extends object>({
return (
<div
{...rowProps}
className={cn("row", {
className={cn("row row-selectable", {
["row-grow"]: fitRowsVertically,
["row-selectable"]: rowSelectionMode === "row",
["row-selected"]: row.isSelected,
})}
onClick={() =>
rowSelectionMode === "row" && selectable && row.toggleRowSelected()
}
onClick={() => selectable && row.toggleRowSelected()}
onMouseOver={event => onMouseOver?.(event, row)}
onMouseOut={event => onMouseOut?.(event, row)}
>
Expand Down
9 changes: 0 additions & 9 deletions packages/graph-explorer/src/components/Tabular/useTabular.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,15 +245,6 @@ export interface TabularOptions<T extends object> {
*/
disableRowSelection?: boolean;

/**
* Defines the row selection behavior:
* "Checkbox" adds a column to the table at the most left position.
* "row" allows to Select the row by clicking on the row itself.
* If it is not defined, rows are selectable but their management should be implemented
* using controls or custom columns definitions
*/
rowSelectionMode?: "checkbox" | "row";

/**
* Record with initial selected rows ids.
* Changes in this record will not trigger any table update. For externally management of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ const EdgesTabular = forwardRef<TabularInstance<ToggleEdge>, any>(
<Tabular
ref={ref}
fullWidth
rowSelectionMode="row"
selectedRowIds={selectedRowsIds}
toggleRowSelected={onSelectRows}
data={data}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ const NodesTabular = forwardRef<TabularInstance<ToggleVertex>, any>(
<Tabular
ref={ref}
fullWidth
rowSelectionMode="row"
selectedRowIds={selectedRowsIds}
toggleRowSelected={onSelectRows}
data={data}
Expand Down