Skip to content

Commit

Permalink
Merge pull request #335 from hjalmers/ivy-rebuild
Browse files Browse the repository at this point in the history
Cut release
  • Loading branch information
hjalmers authored Aug 7, 2023
2 parents 28ce50c + cf47090 commit 94d436e
Show file tree
Hide file tree
Showing 19 changed files with 3,696 additions and 455 deletions.
3 changes: 2 additions & 1 deletion .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export const parameters = {
"Basic",
"Sorting",
"Nested data",
"Row click & hover",
"Row click & active state",
"Row selection",
"Pagination",
["Setup", "Client-side", "Server-side"],
"Custom templates",
Expand Down
3,085 changes: 2,687 additions & 398 deletions documentation.json

Large diffs are not rendered by default.

47 changes: 40 additions & 7 deletions projects/core/src/lib/core.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
(tableConfig$ | async)?.stickyHeaders?.column
"
[attr.aria-busy]="(loading$ | async) === true ? true : null"
[tabindex]="(tableConfig$ | async)?.activateRowOnKeyboardNavigation ? 0 : -1"
#tableRef
(focus)="listenToKeyboardEvents()"
(focusout)="unsubscribeFromKeyboardEvents(tableRef)"
(mouseenter)="listenToKeyboardEvents()"
(mouseleave)="unsubscribeFromKeyboardEvents(tableRef)"
>
<thead>
<tr
Expand Down Expand Up @@ -195,13 +201,28 @@
let row of table!.data![
table.info.lazyLoaded ? 0 : (currentPaginationIndex$ | async) || 0
];
trackBy: trackRowByFn;
let i = index
"
[attr.id]="'tableRow_' + i"
(click)="table?.config?.rowClick && _rowClick(row, i, $event)"
(mouseover)="table?.config?.rowHover && _hoverRow(row, i, $event)"
(mouseout)="table?.config?.rowHover && _hoverRow(null, null, $event)"
[class.gt-hover]="(rowHover$ | async)?.index === i"
(mouseenter)="
table?.config?.activateRowOnHover && _activateRow(row, i, $event)
"
(mouseleave)="
table?.config?.activateRowOnHover &&
_activateRow(null, null, $event)
"
[ngClass]="[
!!isRowSelectedFn
? (row
| rowSelection
: selection
: isRowSelectedFn
: customClasses.selectedRow)
: '',
(rowActive$ | async)?.index === i ? customClasses.activeRow : ''
]"
>
<ng-container
*ngFor="let column of table.config?.columns | keyvalue: columnOrder"
Expand Down Expand Up @@ -261,11 +282,23 @@
[attr.id]="'tableRow_' + i"
ngClass="{{ (row.key | dashCase) + '-row' }}"
(click)="table?.config?.rowClick && _rowClick(row, i, $event)"
(mouseover)="table?.config?.rowHover && _hoverRow(row, i, $event)"
(mouseout)="
table?.config?.rowHover && _hoverRow(null, null, $event)
(mouseenter)="
table?.config?.activateRowOnHover && _activateRow(row, i, $event)
"
(mouseleave)="
table?.config?.activateRowOnHover &&
_activateRow(null, null, $event)
"
[class.gt-hover]="(rowHover$ | async)?.index === i"
[ngClass]="[
!!isRowSelectedFn
? (row
| rowSelection
: selection
: isRowSelectedFn
: customClasses.selectedRow)
: '',
(rowActive$ | async)?.index === i ? customClasses.activeRow : ''
]"
>
<th class="row-header" scope="row">
{{ row.value.header || row.key | capitalCase }}
Expand Down
Loading

0 comments on commit 94d436e

Please sign in to comment.