Skip to content

Commit

Permalink
fix: header click event
Browse files Browse the repository at this point in the history
  • Loading branch information
hemengke1997 committed Aug 19, 2021
1 parent ffd9a89 commit 28d79c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/ResizableHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ const AntdResizableHeader: React.FC<ComponentProp> = (props) => {
}, [width]);

if (!width || Number.isNaN(Number(width)) || isLast) {
return <th {...rest} style={style} className={className} title={titleTip}></th>;
return (
<th {...rest} style={style} className={className} title={titleTip} onClick={onClick}></th>
);
}

const setBodyStyle = (active: boolean) => {
Expand Down
5 changes: 4 additions & 1 deletion src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
position: absolute;
right: -5px;
bottom: 0;
z-index: 1;
z-index: 4;
display: flex;
justify-content: center;
width: 10px;
Expand All @@ -35,6 +35,9 @@
background: var(--atrh-color, #000);
}
}
&:active {
z-index: 5;
}
}

& .resizable-fake-box {
Expand Down

0 comments on commit 28d79c2

Please sign in to comment.