@@ -65,7 +65,7 @@ import {GridNode} from '@react-types/grid';
6565import { IconContext } from './Icon' ;
6666// @ts -ignore
6767import intlMessages from '../intl/*.json' ;
68- import { isFirstItem , isNextSelected , isPrevSelected } from './ListView' ;
68+ import { isFirstItem , isNextSelected } from './ListView' ;
6969import { LayoutNode } from '@react-stately/layout' ;
7070import { Menu , MenuItem , MenuSection , MenuTrigger } from './Menu' ;
7171import Nubbin from '../ui-icons/S2_MoveHorizontalTableWidget.svg' ;
@@ -371,7 +371,7 @@ export const TableView = forwardRef(function TableView(props: TableViewProps, re
371371 isCheckboxSelection,
372372 isQuiet
373373 } ) }
374- selectionBehavior = " toggle"
374+ selectionBehavior = { selectionStyle === 'highlight' ? 'replace' : ' toggle' }
375375 selectionMode = { selectionMode }
376376 onRowAction = { onAction }
377377 { ...otherProps }
@@ -1003,7 +1003,7 @@ const cell = style<CellRenderProps & S2TableProps & {isDivider: boolean, isTreeC
10031003 // isFirstItem: '[inset -1px 0 0 var(--borderColorGray), inset 0px 1px 0px var(--borderColorBlue)]'
10041004 }
10051005 } ,
1006- zIndex : - 1 ,
1006+ zIndex : - 1
10071007 // borderColor: {
10081008 // default: 'gray-300',
10091009 // forcedColors: 'ButtonBorder'
@@ -1579,15 +1579,7 @@ const row = style({
15791579 // kinda unfortunate but the border is really only needed for the first item case. the issue is related to the divider
15801580 // essentially, the gray box shadow from the divider would appear on top of the blue box shadow but only for the first item
15811581 // in order for it to be on the bottom, i used border...couldn't figure out why this was only happening with box shadow
1582- borderTopWidth : {
1583- default : 0 ,
1584- // selectionStyle: {
1585- // highlight: {
1586- // default: 0,
1587- // isFirstItem: 1
1588- // }
1589- // }
1590- } ,
1582+ borderTopWidth : 0 ,
15911583 borderBottomWidth : {
15921584 selectionStyle : {
15931585 highlight : 0 ,
@@ -1600,7 +1592,7 @@ const row = style({
16001592 borderColor : {
16011593 selectionStyle : {
16021594 highlight : {
1603- default : 'transparent' ,
1595+ default : 'transparent'
16041596 // isFirstItem: {
16051597 // default: 'transparent',
16061598 // isSelected: 'blue-900'
@@ -1630,7 +1622,7 @@ const row = style({
16301622 default : '[inset 0px -1px 0px var(--borderColorBlue), inset 1px 0px 0px var(--borderColorBlue), inset -1px 0px var(--borderColorBlue)]' ,
16311623 isNextSelected : '[inset 1px 0px 0px var(--borderColorBlue), inset -1px 0px var(--borderColorBlue), inset 0px -1px 0px var(--borderColorGray)]' ,
16321624 isFirstItem : {
1633- default : '[inset 0px -1px 0px var(--borderColorBlue), inset 1px 0px 0px var(--borderColorBlue), inset -1px 0px var(--borderColorBlue)]' ,
1625+ default : '[inset 0px 1px 0px var(--borderColorBlue), inset 0px -1px 0px var(--borderColorBlue), inset 1px 0px 0px var(--borderColorBlue), inset -1px 0px var(--borderColorBlue)]' ,
16341626 isNextSelected : '[inset 1px 0px 0px var(--borderColorBlue), inset -1px 0px 0px var(--borderColorBlue), inset 0px -1px 0px var(--borderColorGray)]'
16351627 }
16361628 }
@@ -1643,6 +1635,8 @@ const row = style({
16431635 default : 'calc(self(height) - 1px)'
16441636 }
16451637 } ,
1638+ isolation : 'isolate' ,
1639+ zIndex : 3 ,
16461640 forcedColorAdjust : 'none'
16471641} ) ;
16481642
@@ -1652,7 +1646,7 @@ const border = raw(
16521646 width: 100%;
16531647 height: 100%;
16541648 top: 0;
1655- left : 0;
1649+ inset-inline-start : 0;
16561650 z-index: 3;
16571651 position: absolute;
16581652 box-sizing: border-box;
@@ -1662,6 +1656,7 @@ const border = raw(
16621656 border-inline-end-width: 0px;
16631657 border-style: solid;
16641658 border-color: var(--borderColorBlue);
1659+ }
16651660 `
16661661) ;
16671662
@@ -1693,13 +1688,12 @@ export const Row = /*#__PURE__*/ (forwardRef as forwardRefType)(function Row<T e
16931688 ...tableVisualOptions ,
16941689 selectionStyle,
16951690 isNextSelected : isNextSelected ( id , renderProps . state ) ,
1696- isPrevSelected : isPrevSelected ( id , renderProps . state ) ,
16971691 isFirstItem : isFirstItem ( id , renderProps . state )
16981692 } ) + ( renderProps . isFocusVisible ? ' ' + raw ( '&:before { content: ""; display: inline-block; position: sticky; inset-inline-start: 0; width: 3px; height: var(--focusIndicatorHeight); margin-inline-end: -3px; margin-block-end: 1px; z-index: 3; background-color: var(--rowFocusIndicatorColor)' ) : '' )
16991693 + ( isFirstItem ( id , renderProps . state ) && renderProps . isSelected && selectionStyle === 'highlight' ? ' ' + border : '' )
17001694 }
17011695 { ...otherProps } >
1702- { selectionMode !== 'none' && selectionBehavior === 'toggle' && selectionStyle === 'checkbox' && (
1696+ { selectionMode !== 'none' && selectionBehavior === 'toggle' && (
17031697 // Not sure what we want to do with this className, in Cell it currently overrides the className that would have been applied.
17041698 // The `spread` otherProps must be after className in Cell.
17051699 // @ts -ignore
0 commit comments