File tree Expand file tree Collapse file tree
examples/ui-playground/src/app/playground/shadcn/table
packages/ui/src/components/primitives Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ ' @example/ui-playground ' : patch
3+ ' @genseki/ui ' : patch
4+ ---
5+
6+ fix: table shadow and table example.
Original file line number Diff line number Diff line change @@ -483,7 +483,7 @@ function BasicStickyColumnTable() {
483483 getPaginationRowModel : getPaginationRowModel ( ) ,
484484 columns,
485485 state : {
486- columnPinning : { left : [ 'id' ] } ,
486+ columnPinning : { left : [ 'id' ] , right : [ 'notes' ] } ,
487487 pagination : { pageIndex : pageIndex , pageSize : pageSize } ,
488488 } ,
489489 } )
@@ -495,7 +495,7 @@ function BasicStickyColumnTable() {
495495 < TanstackTableContainer >
496496 < TanstackTable table = { table } />
497497
498- < PaginationBarContainer >
498+ < PaginationBarContainer className = "sticky left-0 bottom-0" >
499499 < Pagination >
500500 < PaginationContent >
501501 < PaginationItem disabled = { firstLage } >
Original file line number Diff line number Diff line change @@ -50,15 +50,16 @@ const getCommonPinningClassesAndStyle = (column: Column<any>) => {
5050 const isLastLeftPinnedColumn = isPinned === 'left' && column . getIsLastColumn ( 'left' )
5151 const isFirstRightPinnedColumn = isPinned === 'right' && column . getIsFirstColumn ( 'right' )
5252
53- const className = cn (
54- isPinned ? 'sticky z-[1]' : 'relative' ,
55- isLastLeftPinnedColumn && 'shadow-[inset_-4px_0_4px_-4px_gray]' ,
56- isFirstRightPinnedColumn && 'shadow-[inset_4px_0_4px_-4px_gray]'
57- )
53+ const className = cn ( isPinned ? 'sticky z-[1]' : 'relative' )
5854
5955 const style : CSSProperties = {
6056 left : isPinned === 'left' ? `${ column . getStart ( 'left' ) } px` : undefined ,
6157 right : isPinned === 'right' ? `${ column . getAfter ( 'right' ) } px` : undefined ,
58+ boxShadow : isLastLeftPinnedColumn
59+ ? 'inset -4px 0 4px -4px #bbbbbb'
60+ : isFirstRightPinnedColumn
61+ ? 'inset 4px 0 4px -4px #bbbbbb'
62+ : undefined ,
6263 width : column . getSize ( ) ,
6364 }
6465
You can’t perform that action at this time.
0 commit comments