File tree Expand file tree Collapse file tree 6 files changed +12
-77
lines changed
src/lib/components/GenericTable Expand file tree Collapse file tree 6 files changed +12
-77
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import {
1212} from "@tanstack/react-table" ;
1313
1414import { GenericTable } from "@/lib/components/GenericTable/GenericTable" ;
15- import { GroupRowActions } from "@/lib/components/GenericTable/GroupRowActions" ;
1615
1716type Machine = {
1817 id : number ;
@@ -438,7 +437,6 @@ export const ConditionallySelectable: Story = {
438437 accessorKey : "id" ,
439438 header : "Actions" ,
440439 cell : ( { row } : { row : Row < Machine > } ) => {
441- if ( row . getIsGrouped ( ) ) return < GroupRowActions row = { row } /> ;
442440 return (
443441 < div className = "actions-cell" >
444442 < Tooltip
@@ -501,6 +499,7 @@ export const Grouped: Story = {
501499 } ,
502500 filterHeaders : ( header : Header < Machine , unknown > ) : boolean =>
503501 header . column . id !== "status" ,
502+ showChevron : true ,
504503 } ,
505504} ;
506505
@@ -581,6 +580,7 @@ export const GroupedSelectable: Story = {
581580 } ,
582581 filterHeaders : ( header : Header < Machine , unknown > ) : boolean =>
583582 header . column . id !== "status" ,
583+ showChevron : true ,
584584 } ,
585585} ;
586586
@@ -633,7 +633,6 @@ export const GroupedNested: Story = {
633633 accessorKey : "id" ,
634634 header : "Actions" ,
635635 cell : ( { row } : { row : Row < Machine > } ) => {
636- if ( row . getIsGrouped ( ) ) return < GroupRowActions row = { row } /> ;
637636 return (
638637 < div className = "actions-cell" >
639638 < Tooltip
Original file line number Diff line number Diff line change @@ -256,12 +256,11 @@ export const GenericTable = <T extends { id: number | string }>({
256256 const isExpanded = row . getIsExpanded ( ) ;
257257 if ( row . getIsGrouped ( ) ) {
258258 return (
259- < Tooltip message = { isExpanded ? "Collapse" : "Expand" } position = "btm-right" >
260- < Icon
261- name = {
262- isExpanded ? ICONS . chevronUp : ICONS . chevronDown
263- }
264- />
259+ < Tooltip
260+ message = { isExpanded ? "Collapse" : "Expand" }
261+ position = "btm-right"
262+ >
263+ < Icon name = { isExpanded ? ICONS . chevronUp : ICONS . chevronDown } />
265264 </ Tooltip >
266265 ) ;
267266 }
@@ -365,7 +364,11 @@ export const GenericTable = <T extends { id: number | string }>({
365364 const willNeedScrolling = contentHeight > availableHeight ;
366365
367366 setNeedsScrolling ( willNeedScrolling ) ;
368- setMaxHeight ( willNeedScrolling ? `${ availableHeight } px` : "auto" ) ;
367+ setMaxHeight (
368+ variant === "full-height" && willNeedScrolling
369+ ? `${ availableHeight } px`
370+ : "auto" ,
371+ ) ;
369372 } ;
370373
371374 updateHeight ( ) ;
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11export * from "./GenericTable" ;
2- export * from "./GroupRowActions/GroupRowActions" ;
You can’t perform that action at this time.
0 commit comments