fix: adds cursor pointer to table column header (#1715)

* fix: adds cursro pointer to table column header

* fix: lifts up the onclick handler to header not tag making consistent with other tables
This commit is contained in:
Ronit Panda
2023-09-25 15:55:03 +05:30
committed by GitHub
parent 0ff535af2d
commit 0ce11b6908
2 changed files with 8 additions and 4 deletions

View File

@@ -97,8 +97,8 @@ export const BoardColumn = ({
return (
<StyledColumn isFirstColumn={isFirstColumn}>
<StyledHeader>
<Tag onClick={handleTitleClick} color={color ?? 'gray'} text={title} />
<StyledHeader onClick={handleTitleClick}>
<Tag color={color ?? 'gray'} text={title} />
{!!totalAmount && <StyledAmount>${totalAmount}</StyledAmount>}
<StyledNumChildren>{numChildren}</StyledNumChildren>
</StyledHeader>

View File

@@ -72,6 +72,10 @@ const StyledEntityTableColumnMenu = styled(EntityTableColumnMenu)`
z-index: ${({ theme }) => theme.lastLayerZIndex};
`;
const StyledTableHead = styled.thead`
cursor: pointer;
`;
export const EntityTableHeader = () => {
const [resizeFieldOffset, setResizeFieldOffset] = useRecoilState(
resizeFieldOffsetState,
@@ -155,7 +159,7 @@ export const EntityTableHeader = () => {
}, []);
return (
<thead data-select-disable>
<StyledTableHead data-select-disable>
<tr>
<th
style={{
@@ -214,6 +218,6 @@ export const EntityTableHeader = () => {
)}
</th>
</tr>
</thead>
</StyledTableHead>
);
};