Skip to content

[RHCLOUD-48734] Add traditional expandable row support to DataViewTable - #681

Merged
karelhala merged 1 commit into
patternfly:mainfrom
katarinazaprazna:add-support-for-traditional-expandable-rows
Jul 30, 2026
Merged

[RHCLOUD-48734] Add traditional expandable row support to DataViewTable#681
karelhala merged 1 commit into
patternfly:mainfrom
katarinazaprazna:add-support-for-traditional-expandable-rows

Conversation

@katarinazaprazna

Copy link
Copy Markdown
Contributor

Summary

  • Add support for traditional expandable rows
  • Traditional expand renders a dedicated toggle column as the first column
  • No breaking API changes: columnId on ExpandableContent changed from required to optional, existing consumers with columnId get identical compound behavior
  • Add examples and documentation for both expand types
Screenshot From 2026-07-09 23-53-01

Test plan

  • npm run test passes (11 tests in DataViewTableBasic)
  • Docs dev server: expandable rows example renders with toggle column
  • Docs dev server: compound expandable rows example renders unchanged
  • Traditional expand: rows without content show empty toggle cell

Closes RHCLOUD-48734

Assisted-by: Claude Code

@MariSvirik

Copy link
Copy Markdown

To be consistent with a simple expandable row pattern from PF,

  1. remove grey background and
  2. Change the orientation of the caret according to the new PF update (default facing down, opened facing up)
  3. Follow this behaviour for the caret https://www.patternfly.org/components/table/react-demos/expandcollapse-all/ - grey background at the click and the hover
  4. It would be great if you could add support for "Expand all" (caret in the column header section)

More technical issues consult with Patternfly team.

@karelhala karelhala left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall solid PR — clean separation of compound vs traditional expand, good test coverage, docs well-structured. Three inline comments.

Comment thread packages/module/src/DataViewTableBasic/DataViewTableBasic.tsx Outdated
Comment thread packages/module/src/DataViewTableBasic/DataViewTableBasic.tsx Outdated
Comment thread packages/module/src/DataViewTableBasic/DataViewTableBasic.tsx Outdated
@katarinazaprazna

Copy link
Copy Markdown
Contributor Author

Thanks for catching those edge cases! I've applied the changes :)

@katarinazaprazna
katarinazaprazna force-pushed the add-support-for-traditional-expandable-rows branch from d09ec6b to 5e613a9 Compare July 29, 2026 11:50
@katarinazaprazna
katarinazaprazna force-pushed the add-support-for-traditional-expandable-rows branch from 5e613a9 to 8cc7fd4 Compare July 30, 2026 08:48
@karelhala
karelhala merged commit 6e33d36 into patternfly:main Jul 30, 2026
11 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 6.6.0-prerelease.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants