Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/chore-table-reduce-acceptable-min-col-width.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clickhouse/click-ui': minor
---

Reduce table's resizer minimal column width. Prevent resizer handler overlapping the text on intersection by applying the background colour to crop it.
8 changes: 6 additions & 2 deletions src/components/Table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,12 @@ const Resizer = styled.div`
transition: opacity 0.2s;
border-radius: 0.5rem;
transform: translateX(50%);
background-color: ${({ theme }) => theme.click.table.header.color.background.default};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why doesn't it truncate when dragging?

Image


&:hover {
opacity: 0.6;
&::before {
opacity: 0.6;
}
}

&::before {
Expand Down Expand Up @@ -755,7 +758,8 @@ interface ResizeState {
}

// TODO: What is an acceptable minimum column width?
const MIN_COLUMN_WIDTH = 120;
// made closest to a single character wide?!
const MIN_COLUMN_WIDTH = 40;

const Table = forwardRef<HTMLTableElement, TableProps>(
(
Expand Down
Loading