Skip to content

Commit

Permalink
Remove column highlighting on sort
Browse files Browse the repository at this point in the history
  • Loading branch information
allejo committed Oct 29, 2022
1 parent f99bc57 commit 946a968
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions lib/ts/controllers/s-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ enum SortOrder {
None = 'none',
}

const sortedHeaderBackground = 'bg-powder-200';
const sortedColumnBackground = 'bg-powder-100';

export class TableController extends Stacks.StacksController {
readonly columnTarget!: HTMLTableCellElement;
readonly columnTargets!: HTMLTableCellElement[];
Expand Down Expand Up @@ -115,12 +112,6 @@ export class TableController extends Stacks.StacksController {
const row = rows[rowIndex];
row.parentElement!.removeChild(row);

for (let i = 0; i < row.cells.length; i++) {
const cell = row.cells.item(i);

cell?.classList.toggle(sortedColumnBackground, i === colno);
}

if (firstBottomRow) {
tbody.insertBefore(row, firstBottomRow);
} else {
Expand All @@ -143,7 +134,6 @@ export class TableController extends Stacks.StacksController {
: SortOrder.None;

header.classList.toggle('is-sorted', isCurrent && direction !== SortOrder.None);
header.classList.toggle(sortedHeaderBackground, isCurrent);
header.querySelectorAll('.js-sorting-indicator').forEach((icon) => {
icon.classList.toggle('d-none', !icon.classList.contains('js-sorting-indicator-' + classSuffix));
});
Expand Down

0 comments on commit 946a968

Please sign in to comment.