Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardoperra committed May 2, 2024
1 parent a571cba commit f651c6c
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion examples/angular/basic/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class AppComponent implements OnInit {
}))

ngOnInit() {
this.data.set(defaultData);
this.data.set(defaultData)
}

rerender() {
Expand Down
3 changes: 1 addition & 2 deletions examples/angular/column-visibility/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
type OnInit,
signal,
} from '@angular/core'
import { RouterOutlet } from '@angular/router'
import {
ColumnDef,
createAngularTable,
Expand Down Expand Up @@ -105,7 +104,7 @@ const defaultColumns: ColumnDef<Person>[] = [
@Component({
selector: 'app-root',
standalone: true,
imports: [RouterOutlet, FlexRenderDirective],
imports: [FlexRenderDirective],
templateUrl: './app.component.html',
styleUrl: './app.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
4 changes: 2 additions & 2 deletions examples/angular/row-selection/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ export class AppComponent {
getFilteredRowModel: getFilteredRowModel(),
getPaginationRowModel: getPaginationRowModel(),
debugTable: true,
}));
}))

constructor() {
console.log("table", this.table);
console.log('table', this.table)
}

readonly stringifiedRowSelection = computed(() =>
Expand Down
1 change: 0 additions & 1 deletion examples/angular/signal-input/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@
<button class="border rounded p-2 mb-2" (click)="nextPage()">
Next page
</button>

</div>
</div>
12 changes: 8 additions & 4 deletions examples/angular/signal-input/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import {ChangeDetectionStrategy, Component, effect, signal} from '@angular/core'
import {
ChangeDetectionStrategy,
Component,
effect,
signal,
} from '@angular/core'
import { type PaginationState } from '@tanstack/angular-table'
import { makeData } from './makeData'
import { PersonTableComponent } from './person-table/person-table.component'
Expand All @@ -9,7 +14,6 @@ import { PersonTableComponent } from './person-table/person-table.component'
imports: [PersonTableComponent],
templateUrl: './app.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,

})
export class AppComponent {
data = signal(makeData(10000))
Expand All @@ -25,14 +29,14 @@ export class AppComponent {
previousPage(): void {
this.pagination.update(pagination => ({
...pagination,
pageIndex: pagination.pageIndex - 1
pageIndex: pagination.pageIndex - 1,
}))
}

nextPage(): void {
this.pagination.update(pagination => ({
...pagination,
pageIndex: pagination.pageIndex + 1
pageIndex: pagination.pageIndex + 1,
}))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ import {
export class PersonTableComponent {
readonly data = input.required<Person[]>()

readonly pagination = model.required<PaginationState>();
readonly pagination = model.required<PaginationState>()

readonly columns: ColumnDef<Person>[] = [
{
accessorKey: 'firstName',
header: 'First Name',
cell: info => info.getValue()
cell: info => info.getValue(),
},
{
accessorFn: row => row.lastName,
Expand Down Expand Up @@ -77,7 +77,7 @@ export class PersonTableComponent {

constructor() {
setTimeout(() => {
console.log({...this.table});
console.log({ ...this.table })
}, 1000)
}
}
2 changes: 1 addition & 1 deletion packages/angular-table/src/lazy-signal-initializer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {untracked} from '@angular/core'
import { untracked } from '@angular/core'

/**
* Implementation from @tanstack/angular-query
Expand Down

0 comments on commit f651c6c

Please sign in to comment.