Skip to content

feat(SkeletonTable): add hasHeader prop - #973

Open
platex-rehor-bot wants to merge 1 commit into
patternfly:mainfrom
platex-rehor-bot:bot/PF-4546
Open

feat(SkeletonTable): add hasHeader prop#973
platex-rehor-bot wants to merge 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SkeletonTable: add option to hide header skeleton rows

1 participant