Skip to content

Commit

Permalink
chore: bindings renamed
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardmarcinco committed Oct 1, 2024
1 parent 5864767 commit 28f62e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions src/table/head/table-head-expand.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,20 @@ import { Observable } from "rxjs";
<button
class="cds--table-expand__button"
[attr.aria-label]="getAriaLabel() | async"
(click)="change.emit(!allRowsExpanded)"
>
(click)="expandedChange.emit(!expanded)">
<svg cdsIcon="chevron--right" size="16" class="cds--table-expand__svg"></svg>
</button>
`
})
export class TableHeadExpand {
@HostBinding("class.cds--table-expand") hostClass = true;

@Input() allRowsExpanded = false;
@Input() expanded = false;

@Output() change = new EventEmitter<boolean>();
@Output() expandedChange = new EventEmitter<boolean>();

@HostBinding("attr.data-previous-value") get previousValue() {
return this.allRowsExpanded ? "collapsed" : null;
return this.expanded ? "collapsed" : null;
}

protected _ariaLabel = this.i18n.getOverridable("TABLE.EXPAND_ALL_BUTTON");
Expand Down
4 changes: 2 additions & 2 deletions src/table/head/table-head.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import { TableRowSize } from "../table.types";
scope="col"
[ngClass]="{'cds--table-expand-v2': stickyHeader}"
[id]="model.getId('expand')"
[allRowsExpanded]="model.expandableRowsCount() === model.expandedRowsCount()"
(change)="onExpandAllRowsChange($event)">
[expanded]="model.expandableRowsCount() === model.expandedRowsCount()"
(expandedChange)="onExpandAllRowsChange($event)">
</th>
<th
*ngIf="!skeleton && showSelectionColumn && enableSingleSelect"
Expand Down

0 comments on commit 28f62e5

Please sign in to comment.