File tree Expand file tree Collapse file tree 3 files changed +143
-137
lines changed
polaris-react/src/components/IndexTable
polaris.shopify.com/public Expand file tree Collapse file tree 3 files changed +143
-137
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @shopify/polaris ' : patch
3+ ---
4+
5+ Fix visual bug for sortable, selectable index table headings
Original file line number Diff line number Diff line change @@ -682,10 +682,10 @@ function IndexTableBase({
682682 function renderHeading ( heading : IndexTableHeading , index : number ) {
683683 const isSecond = index === 0 ;
684684 const isLast = index === headings . length - 1 ;
685+ const hasSortable = sortable ?. some ( ( value ) => value === true ) ;
685686 const headingContentClassName = classNames (
686687 styles . TableHeading ,
687- sortable ?. some ( ( value ) => value === true ) &&
688- styles [ 'TableHeading-sortable' ] ,
688+ hasSortable && styles [ 'TableHeading-sortable' ] ,
689689 isSecond && styles [ 'TableHeading-second' ] ,
690690 isLast && ! heading . hidden && styles [ 'TableHeading-last' ] ,
691691 ! selectable && styles [ 'TableHeading-unselectable' ] ,
@@ -717,6 +717,7 @@ function IndexTableBase({
717717
718718 const checkboxClassName = classNames (
719719 styles . TableHeading ,
720+ hasSortable && styles [ 'TableHeading-sortable' ] ,
720721 index === 0 && styles [ 'TableHeading-first' ] ,
721722 ) ;
722723
You can’t perform that action at this time.
0 commit comments