diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 6a5ed2d4a4..963fe444ec 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,8 +1,11 @@ blank_issues_enabled: false contact_links: - - name: Feature Requests & Questions + - name: šŸ¤” Feature Requests & Questions url: https://github.com/TanStack/table/discussions about: Please ask and answer questions here. - - name: Community Chat + - name: šŸ’¬ Community Chat url: https://discord.gg/mQd7egN about: A dedicated discord server hosted by TanStack + - name: šŸ¦‹ TanStack Bluesky + url: https://bsky.app/profile/tanstack.com + about: Stay up to date with new releases of our libraries diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index 8ca8702155..e3bc82ecfd 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -18,13 +18,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5.0.0 + uses: actions/checkout@v6.0.1 with: fetch-depth: 0 - name: Setup Tools uses: tanstack/config/.github/setup@main - name: Fix formatting - run: pnpm prettier:write + run: pnpm format - name: Apply fixes uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a with: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index db5a2157ca..ed8ac2b67e 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5.0.0 + uses: actions/checkout@v6.0.1 with: fetch-depth: 0 - name: Start Nx Agents @@ -31,7 +31,7 @@ jobs: - name: Setup Tools uses: tanstack/config/.github/setup@main - name: Get base and head commits for `nx affected` - uses: nrwl/nx-set-shas@v4.3.3 + uses: nrwl/nx-set-shas@v4.4.0 with: main-branch-name: main - name: Run Checks @@ -44,7 +44,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5.0.0 + uses: actions/checkout@v6.0.1 with: fetch-depth: 0 - name: Setup Tools @@ -58,7 +58,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5.0.0 + uses: actions/checkout@v6.0.1 with: fetch-depth: 0 - name: Check Provenance diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8348d7025a..7e0555074c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: ci +name: Release on: push: @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5.0.0 + uses: actions/checkout@v6.0.1 with: fetch-depth: 0 - name: Start Nx Agents @@ -44,4 +44,3 @@ jobs: title: 'ci: Version Packages' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/examples/angular/basic/src/app/app.component.ts b/examples/angular/basic/src/app/app.component.ts index 29d0edb180..38495b0b7e 100644 --- a/examples/angular/basic/src/app/app.component.ts +++ b/examples/angular/basic/src/app/app.component.ts @@ -46,35 +46,35 @@ const defaultData: Person[] = [ const defaultColumns: ColumnDef[] = [ { accessorKey: 'firstName', - cell: info => info.getValue(), - footer: info => info.column.id, + cell: (info) => info.getValue(), + footer: (info) => info.column.id, }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => `${info.getValue()}`, + cell: (info) => `${info.getValue()}`, header: () => `Last Name`, - footer: info => info.column.id, + footer: (info) => info.column.id, }, { accessorKey: 'age', header: () => 'Age', - footer: info => info.column.id, + footer: (info) => info.column.id, }, { accessorKey: 'visits', header: () => `Visits`, - footer: info => info.column.id, + footer: (info) => info.column.id, }, { accessorKey: 'status', header: 'Status', - footer: info => info.column.id, + footer: (info) => info.column.id, }, { accessorKey: 'progress', header: 'Profile Progress', - footer: info => info.column.id, + footer: (info) => info.column.id, }, ] diff --git a/examples/angular/basic/src/main.ts b/examples/angular/basic/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/basic/src/main.ts +++ b/examples/angular/basic/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/column-ordering/src/app/app.component.ts b/examples/angular/column-ordering/src/app/app.component.ts index 2f447c6f61..aca98fffe1 100644 --- a/examples/angular/column-ordering/src/app/app.component.ts +++ b/examples/angular/column-ordering/src/app/app.component.ts @@ -18,30 +18,30 @@ import { faker } from '@faker-js/faker' const defaultColumns: ColumnDef[] = [ { header: 'Name', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'firstName', - cell: info => info.getValue(), - footer: props => props.column.id, + cell: (info) => info.getValue(), + footer: (props) => props.column.id, }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => 'Last Name', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, { header: 'Info', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'age', header: () => 'Age', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { header: 'More Info', @@ -49,17 +49,17 @@ const defaultColumns: ColumnDef[] = [ { accessorKey: 'visits', header: () => 'Visits', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'status', header: 'Status', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'progress', header: 'Profile Progress', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, @@ -87,12 +87,12 @@ export class AppComponent { columnVisibility: this.columnVisibility(), }, getCoreRowModel: getCoreRowModel(), - onColumnVisibilityChange: updaterOrValue => { + onColumnVisibilityChange: (updaterOrValue) => { typeof updaterOrValue === 'function' ? this.columnVisibility.update(updaterOrValue) : this.columnVisibility.set(updaterOrValue) }, - onColumnOrderChange: updaterOrValue => { + onColumnOrderChange: (updaterOrValue) => { typeof updaterOrValue === 'function' ? this.columnOrder.update(updaterOrValue) : this.columnOrder.set(updaterOrValue) @@ -108,7 +108,7 @@ export class AppComponent { randomizeColumns() { this.table.setColumnOrder( - faker.helpers.shuffle(this.table.getAllLeafColumns().map(d => d.id)) + faker.helpers.shuffle(this.table.getAllLeafColumns().map((d) => d.id)), ) } diff --git a/examples/angular/column-ordering/src/main.ts b/examples/angular/column-ordering/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/column-ordering/src/main.ts +++ b/examples/angular/column-ordering/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/column-pinning-sticky/src/app/app.component.ts b/examples/angular/column-pinning-sticky/src/app/app.component.ts index c9fe3ce9e6..43af4a5142 100644 --- a/examples/angular/column-pinning-sticky/src/app/app.component.ts +++ b/examples/angular/column-pinning-sticky/src/app/app.component.ts @@ -32,44 +32,44 @@ const defaultColumns: ColumnDef[] = [ accessorKey: 'firstName', id: 'firstName', header: 'First Name', - cell: info => info.getValue(), - footer: props => props.column.id, + cell: (info) => info.getValue(), + footer: (props) => props.column.id, size: 180, }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => 'Last Name', - footer: props => props.column.id, + footer: (props) => props.column.id, size: 180, }, { accessorKey: 'age', id: 'age', header: 'Age', - footer: props => props.column.id, + footer: (props) => props.column.id, size: 180, }, { accessorKey: 'visits', id: 'visits', header: 'Visits', - footer: props => props.column.id, + footer: (props) => props.column.id, size: 180, }, { accessorKey: 'status', id: 'status', header: 'Status', - footer: props => props.column.id, + footer: (props) => props.column.id, size: 180, }, { accessorKey: 'progress', id: 'progress', header: 'Profile Progress', - footer: props => props.column.id, + footer: (props) => props.column.id, size: 180, }, ] @@ -103,7 +103,7 @@ export class AppComponent { }) readonly getCommonPinningStyles = ( - column: Column + column: Column, ): Record => { const isPinned = column.getIsPinned() const isLastLeftPinnedColumn = @@ -128,7 +128,7 @@ export class AppComponent { randomizeColumns() { this.table.setColumnOrder( - faker.helpers.shuffle(this.table.getAllLeafColumns().map(d => d.id)) + faker.helpers.shuffle(this.table.getAllLeafColumns().map((d) => d.id)), ) } diff --git a/examples/angular/column-pinning-sticky/src/main.ts b/examples/angular/column-pinning-sticky/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/column-pinning-sticky/src/main.ts +++ b/examples/angular/column-pinning-sticky/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/column-pinning/src/app/app.component.ts b/examples/angular/column-pinning/src/app/app.component.ts index 3784a0782c..fab5cd7262 100644 --- a/examples/angular/column-pinning/src/app/app.component.ts +++ b/examples/angular/column-pinning/src/app/app.component.ts @@ -29,30 +29,30 @@ type Person = { const defaultColumns: ColumnDef[] = [ { header: 'Name', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'firstName', - cell: info => info.getValue(), - footer: props => props.column.id, + cell: (info) => info.getValue(), + footer: (props) => props.column.id, }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => 'Last Name', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, { header: 'Info', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'age', header: () => 'Age', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { header: 'More Info', @@ -60,17 +60,17 @@ const defaultColumns: ColumnDef[] = [ { accessorKey: 'visits', header: () => 'Visits', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'status', header: 'Status', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'progress', header: 'Profile Progress', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, @@ -100,17 +100,17 @@ export class AppComponent { columnOrder: this.columnOrder(), columnPinning: this.columnPinning(), }, - onColumnVisibilityChange: updaterOrValue => { + onColumnVisibilityChange: (updaterOrValue) => { typeof updaterOrValue === 'function' ? this.columnVisibility.update(updaterOrValue) : this.columnVisibility.set(updaterOrValue) }, - onColumnOrderChange: updaterOrValue => { + onColumnOrderChange: (updaterOrValue) => { typeof updaterOrValue === 'function' ? this.columnOrder.update(updaterOrValue) : this.columnOrder.set(updaterOrValue) }, - onColumnPinningChange: updaterOrValue => { + onColumnPinningChange: (updaterOrValue) => { typeof updaterOrValue === 'function' ? this.columnPinning.update(updaterOrValue) : this.columnPinning.set(updaterOrValue) @@ -127,7 +127,7 @@ export class AppComponent { randomizeColumns() { this.table.setColumnOrder( - faker.helpers.shuffle(this.table.getAllLeafColumns().map(d => d.id)) + faker.helpers.shuffle(this.table.getAllLeafColumns().map((d) => d.id)), ) } diff --git a/examples/angular/column-pinning/src/main.ts b/examples/angular/column-pinning/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/column-pinning/src/main.ts +++ b/examples/angular/column-pinning/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/column-resizing-performant/src/app/app.component.ts b/examples/angular/column-resizing-performant/src/app/app.component.ts index 43efd47de2..f7da925eb9 100644 --- a/examples/angular/column-resizing-performant/src/app/app.component.ts +++ b/examples/angular/column-resizing-performant/src/app/app.component.ts @@ -17,45 +17,45 @@ import { TableResizableCell, TableResizableHeader } from './resizable-cell' const defaultColumns: ColumnDef[] = [ { header: 'Name', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'firstName', - cell: info => info.getValue(), - footer: props => props.column.id, + cell: (info) => info.getValue(), + footer: (props) => props.column.id, }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => 'Last Name', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, { header: 'Info', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'age', header: () => 'Age', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'visits', header: () => 'Visits', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'status', header: 'Status', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'progress', header: 'Profile Progress', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, @@ -72,7 +72,7 @@ export class AppComponent { readonly data = signal(makeData(200)) readonly columnSizingInfo = computed( - () => this.table.getState().columnSizingInfo + () => this.table.getState().columnSizingInfo, ) readonly columnSizing = computed(() => this.table.getState().columnSizing) @@ -116,7 +116,7 @@ export class AppComponent { columnSizing: this.table.getState().columnSizing, }, null, - 2 - ) + 2, + ), ) } diff --git a/examples/angular/column-resizing-performant/src/app/resizable-cell.ts b/examples/angular/column-resizing-performant/src/app/resizable-cell.ts index 2338bbc8c4..af40d01940 100644 --- a/examples/angular/column-resizing-performant/src/app/resizable-cell.ts +++ b/examples/angular/column-resizing-performant/src/app/resizable-cell.ts @@ -13,7 +13,7 @@ export class TableResizableHeader { }) readonly width = computed( - () => `calc(var(--header-${this.cellId()}-size) * 1px)` + () => `calc(var(--header-${this.cellId()}-size) * 1px)`, ) } @@ -30,6 +30,6 @@ export class TableResizableCell { }) readonly width = computed( - () => `calc(var(--col-${this.cellId()}-size) * 1px)` + () => `calc(var(--col-${this.cellId()}-size) * 1px)`, ) } diff --git a/examples/angular/column-resizing-performant/src/main.ts b/examples/angular/column-resizing-performant/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/column-resizing-performant/src/main.ts +++ b/examples/angular/column-resizing-performant/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/column-visibility/src/app/app.component.ts b/examples/angular/column-visibility/src/app/app.component.ts index c38a366b3c..b710675993 100644 --- a/examples/angular/column-visibility/src/app/app.component.ts +++ b/examples/angular/column-visibility/src/app/app.component.ts @@ -52,30 +52,30 @@ const defaultData: Person[] = [ const defaultColumns: ColumnDef[] = [ { header: 'Name', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'firstName', - cell: info => info.getValue(), - footer: props => props.column.id, + cell: (info) => info.getValue(), + footer: (props) => props.column.id, }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => 'Last Name', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, { header: 'Info', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'age', header: () => 'Age', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { header: 'More Info', @@ -83,17 +83,17 @@ const defaultColumns: ColumnDef[] = [ { accessorKey: 'visits', header: () => 'Visits', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'status', header: 'Status', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'progress', header: 'Profile Progress', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, @@ -119,7 +119,7 @@ export class AppComponent implements OnInit { columnVisibility: this.columnVisibility(), }, getCoreRowModel: getCoreRowModel(), - onColumnVisibilityChange: updaterOrValue => { + onColumnVisibilityChange: (updaterOrValue) => { const visibilityState = typeof updaterOrValue === 'function' ? updaterOrValue(this.columnVisibility()) diff --git a/examples/angular/column-visibility/src/main.ts b/examples/angular/column-visibility/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/column-visibility/src/main.ts +++ b/examples/angular/column-visibility/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/editable/src/app/app.component.ts b/examples/angular/editable/src/app/app.component.ts index 54956725a4..95f301bab2 100644 --- a/examples/angular/editable/src/app/app.component.ts +++ b/examples/angular/editable/src/app/app.component.ts @@ -34,7 +34,7 @@ const defaultColumn: Partial> = { value: initialValue, }, outputs: { - blur: value => { + blur: (value) => { if (table.options.meta?.updateData) { table.options.meta.updateData(row.index, column.id, value) } @@ -47,33 +47,33 @@ const defaultColumn: Partial> = { const defaultColumns: ColumnDef[] = [ { accessorKey: 'firstName', - footer: info => info.column.id, + footer: (info) => info.column.id, }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', header: () => `Last Name`, - footer: info => info.column.id, + footer: (info) => info.column.id, }, { accessorKey: 'age', header: () => 'Age', - footer: info => info.column.id, + footer: (info) => info.column.id, }, { accessorKey: 'visits', header: () => `Visits`, - footer: info => info.column.id, + footer: (info) => info.column.id, }, { accessorKey: 'status', header: 'Status', - footer: info => info.column.id, + footer: (info) => info.column.id, }, { accessorKey: 'progress', header: 'Profile Progress', - footer: info => info.column.id, + footer: (info) => info.column.id, }, ] @@ -105,7 +105,7 @@ export class AppComponent { // Skip page index reset until after next rerender this.autoResetPageIndex.set(false) - this.data.update(old => + this.data.update((old) => old.map((row, index) => { if (index === rowIndex) { return { @@ -114,7 +114,7 @@ export class AppComponent { } } return row - }) + }), ) afterNextRender(() => this.autoResetPageIndex.set(true), { diff --git a/examples/angular/editable/src/main.ts b/examples/angular/editable/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/editable/src/main.ts +++ b/examples/angular/editable/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/expanding/src/app/app.component.ts b/examples/angular/expanding/src/app/app.component.ts index 741f357e53..d5db0d639b 100644 --- a/examples/angular/expanding/src/app/app.component.ts +++ b/examples/angular/expanding/src/app/app.component.ts @@ -31,31 +31,31 @@ const defaultColumns: ColumnDef[] = [ cell: () => flexRenderComponent(ExpandableCell), }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => 'Last Name', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'age', header: () => 'Age', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'visits', header: () => `Visits`, - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'status', header: 'Status', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'progress', header: 'Profile Progress', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ] @@ -76,11 +76,11 @@ export class AppComponent { state: { expanded: this.expanded(), }, - onExpandedChange: updater => + onExpandedChange: (updater) => typeof updater === 'function' ? this.expanded.update(updater) : this.expanded.set(updater), - getSubRows: row => row.subRows, + getSubRows: (row) => row.subRows, getCoreRowModel: getCoreRowModel(), getPaginationRowModel: getPaginationRowModel(), getFilteredRowModel: getFilteredRowModel(), @@ -91,11 +91,11 @@ export class AppComponent { })) readonly rawExpandedState = computed(() => - JSON.stringify(this.expanded(), undefined, 2) + JSON.stringify(this.expanded(), undefined, 2), ) readonly rawRowSelectionState = computed(() => - JSON.stringify(this.table.getState().rowSelection, undefined, 2) + JSON.stringify(this.table.getState().rowSelection, undefined, 2), ) onPageInputChange(event: Event): void { diff --git a/examples/angular/expanding/src/main.ts b/examples/angular/expanding/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/expanding/src/main.ts +++ b/examples/angular/expanding/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/filters/src/app/app.component.ts b/examples/angular/filters/src/app/app.component.ts index 1748a57674..7d5b55dfab 100644 --- a/examples/angular/filters/src/app/app.component.ts +++ b/examples/angular/filters/src/app/app.component.ts @@ -36,12 +36,12 @@ export class AppComponent { readonly columns: ColumnDef[] = [ { accessorKey: 'firstName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => 'Last Name', }, { @@ -80,7 +80,7 @@ export class AppComponent { state: { columnFilters: this.columnFilters(), }, - onColumnFiltersChange: updater => { + onColumnFiltersChange: (updater) => { updater instanceof Function ? this.columnFilters.update(updater) : this.columnFilters.set(updater) @@ -98,7 +98,7 @@ export class AppComponent { })) readonly stringifiedFilters = computed(() => - JSON.stringify(this.columnFilters(), null, 2) + JSON.stringify(this.columnFilters(), null, 2), ) onPageInputChange(event: Event): void { diff --git a/examples/angular/filters/src/app/debounced-input.directive.ts b/examples/angular/filters/src/app/debounced-input.directive.ts index 19d5ef1b55..e91e24a8d4 100644 --- a/examples/angular/filters/src/app/debounced-input.directive.ts +++ b/examples/angular/filters/src/app/debounced-input.directive.ts @@ -9,11 +9,11 @@ import { import { outputFromObservable, toObservable } from '@angular/core/rxjs-interop' export function runOutsideAngular( - zone: NgZone + zone: NgZone, ): MonoTypeOperatorFunction { - return source => - new Observable(subscriber => - zone.runOutsideAngular(() => source.subscribe(subscriber)) + return (source) => + new Observable((subscriber) => + zone.runOutsideAngular(() => source.subscribe(subscriber)), ) } @@ -29,9 +29,9 @@ export class DebouncedInputDirective { readonly changeEvent = outputFromObservable( this.debounce$.pipe( - switchMap(debounce => { + switchMap((debounce) => { return fromEvent(this.#ref, 'change').pipe(debounceTime(debounce)) - }) - ) + }), + ), ) } diff --git a/examples/angular/filters/src/app/table-filter.component.ts b/examples/angular/filters/src/app/table-filter.component.ts index 2c897cfe7d..48636284ce 100644 --- a/examples/angular/filters/src/app/table-filter.component.ts +++ b/examples/angular/filters/src/app/table-filter.component.ts @@ -90,7 +90,7 @@ export class FilterComponent { }) readonly columnFilterValue = computed(() => - this.column().getFilterValue() + this.column().getFilterValue(), ) readonly minRangePlaceholder = computed(() => { diff --git a/examples/angular/filters/src/main.ts b/examples/angular/filters/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/filters/src/main.ts +++ b/examples/angular/filters/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/grouping/src/app/columns.ts b/examples/angular/grouping/src/app/columns.ts index ab35acdf4b..28a4536623 100644 --- a/examples/angular/grouping/src/app/columns.ts +++ b/examples/angular/grouping/src/app/columns.ts @@ -17,18 +17,18 @@ export const columns: ColumnDef[] = [ { accessorKey: 'firstName', header: 'First Name', - cell: info => info.getValue(), + cell: (info) => info.getValue(), /** * override the value used for row grouping * (otherwise, defaults to the value derived from accessorKey / accessorFn) */ - getGroupingValue: row => `${row.firstName} ${row.lastName}`, + getGroupingValue: (row) => `${row.firstName} ${row.lastName}`, }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', header: () => `Last Name`, - cell: info => info.getValue(), + cell: (info) => info.getValue(), }, ], }, diff --git a/examples/angular/grouping/src/main.ts b/examples/angular/grouping/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/grouping/src/main.ts +++ b/examples/angular/grouping/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/row-dnd/src/app/app.component.ts b/examples/angular/row-dnd/src/app/app.component.ts index e28c236f08..33afac49a1 100644 --- a/examples/angular/row-dnd/src/app/app.component.ts +++ b/examples/angular/row-dnd/src/app/app.component.ts @@ -32,12 +32,12 @@ const defaultColumns: ColumnDef[] = [ }, { accessorKey: 'firstName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => `Last Name`, }, { @@ -73,7 +73,7 @@ export class AppComponent { return { data: this.data(), columns: defaultColumns, - getRowId: row => row.userId, //required because row indexes will change + getRowId: (row) => row.userId, //required because row indexes will change debugTable: true, debugHeaders: true, debugColumns: true, @@ -83,7 +83,7 @@ export class AppComponent { } }) - readonly sortedIds = computed(() => this.data().map(data => data.userId)) + readonly sortedIds = computed(() => this.data().map((data) => data.userId)) drop(event: CdkDragDrop) { const data = [...this.data()] diff --git a/examples/angular/row-dnd/src/main.ts b/examples/angular/row-dnd/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/row-dnd/src/main.ts +++ b/examples/angular/row-dnd/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/row-selection-signal/src/app/app.component.ts b/examples/angular/row-selection-signal/src/app/app.component.ts index 5e2e103b4a..fb7b416976 100644 --- a/examples/angular/row-selection-signal/src/app/app.component.ts +++ b/examples/angular/row-selection-signal/src/app/app.component.ts @@ -45,31 +45,31 @@ export class AppComponent { }, { header: 'Name', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'firstName', - cell: info => info.getValue(), - footer: props => props.column.id, + cell: (info) => info.getValue(), + footer: (props) => props.column.id, header: 'First name', }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => 'Last Name', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, { header: 'Info', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'age', header: () => this.ageHeaderCell(), - footer: props => props.column.id, + footer: (props) => props.column.id, }, { header: 'More Info', @@ -77,17 +77,17 @@ export class AppComponent { { accessorKey: 'visits', header: () => 'Visits', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'status', header: 'Status', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'progress', header: 'Profile Progress', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, @@ -103,11 +103,11 @@ export class AppComponent { }, enableRowSelection: true, // enable row selection for all rows // enableRowSelection: row => row.original.age > 18, // or enable row selection conditionally per row - onRowSelectionChange: updaterOrValue => { + onRowSelectionChange: (updaterOrValue) => { this.rowSelection.set( typeof updaterOrValue === 'function' ? updaterOrValue(this.rowSelection()) - : updaterOrValue + : updaterOrValue, ) }, getCoreRowModel: getCoreRowModel(), @@ -117,11 +117,11 @@ export class AppComponent { })) readonly stringifiedRowSelection = computed(() => - JSON.stringify(this.rowSelection(), null, 2) + JSON.stringify(this.rowSelection(), null, 2), ) readonly rowSelectionLength = computed( - () => Object.keys(this.rowSelection()).length + () => Object.keys(this.rowSelection()).length, ) onPageInputChange(event: Event): void { @@ -137,7 +137,7 @@ export class AppComponent { logSelectedFlatRows(): void { console.info( 'table.getSelectedRowModel().flatRows', - this.table.getSelectedRowModel().flatRows + this.table.getSelectedRowModel().flatRows, ) } diff --git a/examples/angular/row-selection-signal/src/main.ts b/examples/angular/row-selection-signal/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/row-selection-signal/src/main.ts +++ b/examples/angular/row-selection-signal/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/row-selection/src/app/app.component.ts b/examples/angular/row-selection/src/app/app.component.ts index da7ce36ef5..5a72cc25d4 100644 --- a/examples/angular/row-selection/src/app/app.component.ts +++ b/examples/angular/row-selection/src/app/app.component.ts @@ -51,31 +51,31 @@ export class AppComponent { }, { header: 'Name', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'firstName', - cell: info => info.getValue(), - footer: props => props.column.id, + cell: (info) => info.getValue(), + footer: (props) => props.column.id, header: 'First name', }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => 'Last Name', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, { header: 'Info', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'age', header: () => this.ageHeaderCell(), - footer: props => props.column.id, + footer: (props) => props.column.id, }, { header: 'More Info', @@ -83,17 +83,17 @@ export class AppComponent { { accessorKey: 'visits', header: () => 'Visits', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'status', header: 'Status', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'progress', header: 'Profile Progress', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, @@ -109,11 +109,11 @@ export class AppComponent { }, enableRowSelection: true, // enable row selection for all rows // enableRowSelection: row => row.original.age > 18, // or enable row selection conditionally per row - onRowSelectionChange: updaterOrValue => { + onRowSelectionChange: (updaterOrValue) => { this.rowSelection.set( typeof updaterOrValue === 'function' ? updaterOrValue(this.rowSelection()) - : updaterOrValue + : updaterOrValue, ) }, getCoreRowModel: getCoreRowModel(), @@ -123,11 +123,11 @@ export class AppComponent { })) readonly stringifiedRowSelection = computed(() => - JSON.stringify(this.rowSelection(), null, 2) + JSON.stringify(this.rowSelection(), null, 2), ) readonly rowSelectionLength = computed( - () => Object.keys(this.rowSelection()).length + () => Object.keys(this.rowSelection()).length, ) onPageInputChange(event: Event): void { @@ -143,7 +143,7 @@ export class AppComponent { logSelectedFlatRows(): void { console.info( 'table.getSelectedRowModel().flatRows', - this.table.getSelectedRowModel().flatRows + this.table.getSelectedRowModel().flatRows, ) } diff --git a/examples/angular/row-selection/src/main.ts b/examples/angular/row-selection/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/row-selection/src/main.ts +++ b/examples/angular/row-selection/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/signal-input/src/app/app.component.ts b/examples/angular/signal-input/src/app/app.component.ts index ac4f08a53b..02fbb3b650 100644 --- a/examples/angular/signal-input/src/app/app.component.ts +++ b/examples/angular/signal-input/src/app/app.component.ts @@ -27,14 +27,14 @@ export class AppComponent { } previousPage(): void { - this.pagination.update(pagination => ({ + this.pagination.update((pagination) => ({ ...pagination, pageIndex: pagination.pageIndex - 1, })) } nextPage(): void { - this.pagination.update(pagination => ({ + this.pagination.update((pagination) => ({ ...pagination, pageIndex: pagination.pageIndex + 1, })) diff --git a/examples/angular/signal-input/src/app/person-table/person-table.component.ts b/examples/angular/signal-input/src/app/person-table/person-table.component.ts index 29a8622ce9..e34a9e3ab1 100644 --- a/examples/angular/signal-input/src/app/person-table/person-table.component.ts +++ b/examples/angular/signal-input/src/app/person-table/person-table.component.ts @@ -28,13 +28,13 @@ export class PersonTableComponent { { accessorKey: 'firstName', header: 'First Name', - cell: info => info.getValue(), + cell: (info) => info.getValue(), }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', header: () => `Last Name`, - cell: info => info.getValue(), + cell: (info) => info.getValue(), }, ] @@ -45,7 +45,7 @@ export class PersonTableComponent { state: { pagination: this.pagination(), }, - onPaginationChange: updaterOrValue => { + onPaginationChange: (updaterOrValue) => { typeof updaterOrValue === 'function' ? this.pagination.update(updaterOrValue) : this.pagination.set(updaterOrValue) diff --git a/examples/angular/signal-input/src/main.ts b/examples/angular/signal-input/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/signal-input/src/main.ts +++ b/examples/angular/signal-input/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/sub-components/src/app/app.component.ts b/examples/angular/sub-components/src/app/app.component.ts index 5b6372a173..a52a9c620b 100644 --- a/examples/angular/sub-components/src/app/app.component.ts +++ b/examples/angular/sub-components/src/app/app.component.ts @@ -23,7 +23,7 @@ import { JsonPipe, NgTemplateOutlet } from '@angular/common' const columns: ColumnDef[] = [ { header: 'Name', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { id: 'expander', @@ -46,25 +46,25 @@ const columns: ColumnDef[] = [ accessorKey: 'firstName', header: 'First Name', cell: () => flexRenderComponent(ExpandableCell), - footer: props => props.column.id, + footer: (props) => props.column.id, }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => 'Last Name', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, { header: 'Info', - footer: props => props.column.id, + footer: (props) => props.column.id, columns: [ { accessorKey: 'age', header: () => 'Age', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { header: 'More Info', @@ -72,17 +72,17 @@ const columns: ColumnDef[] = [ { accessorKey: 'visits', header: () => 'Visits', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'status', header: 'Status', - footer: props => props.column.id, + footer: (props) => props.column.id, }, { accessorKey: 'progress', header: 'Profile Progress', - footer: props => props.column.id, + footer: (props) => props.column.id, }, ], }, @@ -112,7 +112,7 @@ export class AppComponent { state: { expanded: this.expanded(), }, - onExpandedChange: updater => + onExpandedChange: (updater) => typeof updater === 'function' ? this.expanded.update(updater) : this.expanded.set(updater), diff --git a/examples/angular/sub-components/src/main.ts b/examples/angular/sub-components/src/main.ts index 0c3b92057c..c3d8f9af99 100644 --- a/examples/angular/sub-components/src/main.ts +++ b/examples/angular/sub-components/src/main.ts @@ -2,4 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser' import { appConfig } from './app/app.config' import { AppComponent } from './app/app.component' -bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)) +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/lit/basic/src/main.ts b/examples/lit/basic/src/main.ts index e913a2f6d0..233c53531c 100644 --- a/examples/lit/basic/src/main.ts +++ b/examples/lit/basic/src/main.ts @@ -25,31 +25,31 @@ const columnHelper = createColumnHelper() const columns = [ columnHelper.accessor('firstName', { - cell: info => info.getValue(), - footer: info => info.column.id, + cell: (info) => info.getValue(), + footer: (info) => info.column.id, }), - columnHelper.accessor(row => row.lastName, { + columnHelper.accessor((row) => row.lastName, { id: 'lastName', - cell: info => html`${info.getValue()}`, + cell: (info) => html`${info.getValue()}`, header: () => html`Last Name`, - footer: info => info.column.id, + footer: (info) => info.column.id, }), columnHelper.accessor('age', { header: () => 'Age', - cell: info => info.renderValue(), - footer: info => info.column.id, + cell: (info) => info.renderValue(), + footer: (info) => info.column.id, }), columnHelper.accessor('visits', { header: () => html`Visits`, - footer: info => info.column.id, + footer: (info) => info.column.id, }), columnHelper.accessor('status', { header: 'Status', - footer: info => info.column.id, + footer: (info) => info.column.id, }), columnHelper.accessor('progress', { header: 'Profile Progress', - footer: info => info.column.id, + footer: (info) => info.column.id, }), ] @@ -105,66 +105,66 @@ class LitTableExample extends LitElement { ${repeat( table.getHeaderGroups(), - headerGroup => headerGroup.id, - headerGroup => + (headerGroup) => headerGroup.id, + (headerGroup) => html`${repeat( headerGroup.headers, - header => header.id, - header => + (header) => header.id, + (header) => html` ${header.isPlaceholder ? null : flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} - ` - )}` + `, + )}`, )} ${repeat( table.getRowModel().rows, - row => row.id, - row => html` + (row) => row.id, + (row) => html` ${repeat( row.getVisibleCells(), - cell => cell.id, - cell => + (cell) => cell.id, + (cell) => html` ${flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )} - ` + `, )} - ` + `, )} ${repeat( table.getFooterGroups(), - footerGroup => footerGroup.id, - footerGroup => html` + (footerGroup) => footerGroup.id, + (footerGroup) => html` ${repeat( footerGroup.headers, - header => header.id, - header => html` + (header) => header.id, + (header) => html` ${header.isPlaceholder ? null : flexRender( header.column.columnDef.footer, - header.getContext() + header.getContext(), )} - ` + `, )} - ` + `, )} diff --git a/examples/lit/column-sizing/src/main.ts b/examples/lit/column-sizing/src/main.ts index 937a39ff6b..5a0685507e 100644 --- a/examples/lit/column-sizing/src/main.ts +++ b/examples/lit/column-sizing/src/main.ts @@ -14,12 +14,12 @@ import { makeData, Person } from './makeData' const columns: ColumnDef[] = [ { accessorKey: 'firstName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), }, { - accessorFn: row => row.lastName, + accessorFn: (row) => row.lastName, id: 'lastName', - cell: info => info.getValue(), + cell: (info) => info.getValue(), header: () => html`Last Name`, }, { @@ -73,18 +73,18 @@ class LitTableExample extends LitElement { ${repeat( table.getHeaderGroups(), - headerGroup => headerGroup.id, - headerGroup => html` + (headerGroup) => headerGroup.id, + (headerGroup) => html` ${headerGroup.headers.map( - header => html` + (header) => html` ${flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} ${header.isPlaceholder ? null @@ -98,10 +98,10 @@ class LitTableExample extends LitElement { @touchstart="${header.getResizeHandler()}" />`} - ` + `, )} - ` + `, )} @@ -109,22 +109,22 @@ class LitTableExample extends LitElement { .getRowModel() .rows.slice(0, 10) .map( - row => html` + (row) => html` ${row .getVisibleCells() .map( - cell => html` + (cell) => html` ${flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )} - ` + `, )} - ` + `, )} @@ -135,7 +135,7 @@ ${JSON.stringify( columnSizingInfo: table.getState().columnSizingInfo, }, null, - 2 + 2, )}