-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(angular-table): Support Tanstack v9 alpha and Angular 19, fix examples #5817
feat(angular-table): Support Tanstack v9 alpha and Angular 19, fix examples #5817
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 5125947. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution
✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
@@ -39,10 +39,10 @@ import type { Column, Table } from '@tanstack/angular-table' | |||
standalone: true, | |||
imports: [CommonModule], | |||
}) | |||
export class FilterComponent<T> implements OnInit { | |||
export class FilterComponent<T extends RowData> implements OnInit { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be changing these generics to include TFeatures since it effects what APIs can be used in the logic of this component.
createColumnHelper, | ||
features: tableHelperOptions._features, | ||
options: _tableHelperOptions as any, | ||
tableCreator: (tableOptions) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is the only difference, we might explore just making some TS overloads and an option for how it needs to work for Angular in the table-core constructTableHelper
function. Good to be here for now.
I'm updating the Angular adapter and related examples to support the new helpers and
_features
property. It's mostly finished, but here's some points:injectTable types
Due to the new TableOptions types, I've seen that there are some typescript issues while passing the _rowModels property, probably since we pass a function as an argument and _rowModels is using
NoInfer
:/The error
Overriding the properties in that way seems resolving the issue, but could there be some contraindications doing this? Would it make sense to have a less strict type?
constructTableHelper/createTableHelper
Since we need to pass a
function
as an argument to theinjectTable/createAngularTable
fn, I think for Angular we should have our own implementation of the core "constructTableHelper" function.In the future we might need to update this function to be invoked within the context of the angular app, for example if we need to create the helper as a constant and still allowing to inject data/options from a token or service.
I've then added a
constructTableHelper.ts
file the updated signature. This helper is used internally bycreateTableHelper
, which is exported publicly.Continue on #5816 for the new proxy implementation