Skip to content

Commit

Permalink
fix(TableHeader): keep header sticky when sticky and resizable
Browse files Browse the repository at this point in the history
  • Loading branch information
MEsteves22 authored and zettca committed Jan 9, 2024
1 parent 9b76b5f commit 75f5589
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/core/src/Table/TableHeader/TableHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const HvTableHeader = forwardRef<HTMLElement, HvTableHeaderProps>(
children,
component,
className,
style,
style: styleProp,
classes: classesProp,
scope: scopeProp,
align = "inherit",
Expand Down Expand Up @@ -136,6 +136,11 @@ export const HvTableHeader = forwardRef<HTMLElement, HvTableHeaderProps>(
: "rowheader";
const paragraph = isParagraph(children);

// Keep the header sticky
const style = stickyColumn
? { ...styleProp, position: "sticky" }
: styleProp;

return (
<Component
ref={externalRef}
Expand Down

0 comments on commit 75f5589

Please sign in to comment.