Skip to content

TreeTable: TreeNode children are not sorted #8361

@gwalter98

Description

@gwalter98

Describe the bug

When sorting a <Column /> that is part of a <TreeTable /> and using TreeNodes with child TreeNodes only the parent rows are sorted, not the child rows.

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

https://stackblitz.com/edit/primevue-4-vite-issue-template-hmbqomky?file=src%2FApp.vue

Environment

Node.js running on macOS 26.2

Vue version

3.5.13

PrimeVue version

4.3.1

Node version

20.19.1

Browser(s)

No response

Steps to reproduce the behavior

  1. Sort the Value column in descending order.
  2. Observe that the parent rows are sorted correctly.
  3. Expand the parent row.
  4. Observer that the child rows have not been sorted correctly.

Expected behavior

I would expect any sorting to also be applied to children Tree Nodes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Needs TriageIssue will be reviewed by Core Team and a relevant label will be added as soon as possible

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions