Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/table-test/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
<ng-template #headerTmpl> Amount </ng-template>
</ngx-currency-table-cell>

<ngx-date-table-cell column="date">
</ngx-date-table-cell>

<ngx-table-cell column="button">
<ng-template #cellTmpl>
<button>Button 1</button>
Expand Down
6 changes: 5 additions & 1 deletion apps/table-test/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export class AppComponent {
id: 'id1',
hello: 'world',
amount: 37,
date: '12/02/2023',
},
{
name: 'Hyperdrive',
Expand All @@ -39,6 +40,7 @@ export class AppComponent {
id: 'SHD',
hello: 'world',
amount: 5000,
date: '12/02/2023',
},
{
name: 'Hyperdrive',
Expand All @@ -47,6 +49,7 @@ export class AppComponent {
id: 'SHD2',
hello: 'world',
amount: 5000,
date: '12/02/2023',
},
];

Expand All @@ -58,12 +61,13 @@ export class AppComponent {
id: 'id3',
hello: 'world',
amount: 0.5,
date: '12/02/2023',
},
];

public data = new BehaviorSubject(this.dataSet1);

public readonly columns = ['firstName', 'name', 'button', 'amount', 'active'];
public readonly columns = ['firstName', 'name', 'date', 'button', 'amount', 'active'];

public showDetail = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export class NgxTreeGridCellDirective extends NgxHasFocusDirective {
element.focus();

// Iben: If the current active element is the same as the element we focussed, on, we break
if (this.elementRef.nativeElement !== document?.activeElement) {
if (element === document?.activeElement) {
result = element;
this.hasFocus = true;

Expand Down