Skip to content

feat(SkeletonTable): add hasHeader prop - #973

Merged
Hyperkid123 merged 1 commit into
patternfly:mainfrom
platex-rehor-bot:bot/PF-4546
Sep 1, 2026
Merged

feat(SkeletonTable): add hasHeader prop#973
Hyperkid123 merged 1 commit into
patternfly:mainfrom
platex-rehor-bot:bot/PF-4546

Conversation

@platex-rehor-bot

Copy link
Copy Markdown
Collaborator

Summary

Adds a hasHeader boolean prop (default true) to SkeletonTable that controls whether the header skeleton row is rendered. When set to false, only body skeleton rows are shown.

Use case: In ansible/ansible-ui, the real table header (with column titles, sort controls, etc.) is already rendered above the loading state. Showing skeleton header rows creates a visual mismatch — users see the real header and a duplicate skeleton header simultaneously.

Closes #968

PF-4546

Changes

  • SkeletonTable.tsx: Added hasHeader prop (default true). When false, <SkeletonTableHead> is not rendered.
  • SkeletonTable.test.tsx: Added tests verifying hasHeader={false} suppresses <thead> and default behavior renders it.
  • Docs: Added "Without header" example and documentation section.

Test plan

  • Existing snapshot tests pass
  • New tests verify hasHeader={false} hides <thead> element
  • New tests verify default behavior still renders header
  • Lint passes with zero errors

PF-4546
Add a `hasHeader` boolean prop (default `true`) to SkeletonTable
that controls whether the header skeleton row is rendered. This
allows consumers to suppress header skeletons when a real table
header is already displayed above the loading state.
@dlabaj
dlabaj self-requested a review August 31, 2026 17:10

@dlabaj dlabaj 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.

LGTM

@Hyperkid123
Hyperkid123 merged commit ea5f4bb into patternfly:main Sep 1, 2026
7 checks passed
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

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

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.

SkeletonTable: add option to hide header skeleton rows

3 participants