Skip to content
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

Column node declaration TypeScript error #2553

Closed
pdowideit opened this issue May 20, 2022 · 1 comment
Closed

Column node declaration TypeScript error #2553

pdowideit opened this issue May 20, 2022 · 1 comment
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@pdowideit
Copy link

When creating a custom entry for a TreeTable using <template #body="slotProps">, the data of the row is in slotProps.node.data.
VSCode marks that as an error since the data is expected to be in slotProps.data.

grafik

In the upper images treeTableProjects is an TreeTableObject[] with

export type TreeTableObject = {
    key: string;
    data: {};
    children: TreeTableObject[];
}

Is this a bug in the data structure or is it an issue I produced by wrong usage?

@pdowideit
Copy link
Author

Using it how VSCode suggests it:
grafik

Leads to:
grafik

@tugcekucukoglu tugcekucukoglu added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label May 24, 2022
@tugcekucukoglu tugcekucukoglu added this to the 3.12.7 milestone May 25, 2022
@tugcekucukoglu tugcekucukoglu self-assigned this May 25, 2022
@tugcekucukoglu tugcekucukoglu changed the title TreeTable body template data structure bug Column node declaration TypeScript error May 25, 2022
tugcekucukoglu added a commit that referenced this issue May 25, 2022
Fixed #2553 - Column node declaration TypeScript error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants