diff --git a/src/assets/style/resizable-columns.css b/src/assets/style/resizable-columns.css new file mode 100644 index 0000000..d511e40 --- /dev/null +++ b/src/assets/style/resizable-columns.css @@ -0,0 +1,43 @@ +.resizable-columns th { + position: relative; + text-align: center; + white-space: nowrap; +} + +.column-resize-handle { + position: absolute; + inset: 0 -4px 0 auto; + width: 9px; + z-index: 1; + cursor: col-resize; + touch-action: none; +} + +.column-resize-handle::after { + content: ''; + position: absolute; + inset: 25% 4px; + background: currentColor; + opacity: 0.25; +} + +.column-resize-handle:hover::after, +.column-resize-handle:focus-visible::after { + opacity: 1; +} + +.column-resize-handle:focus-visible { + outline: 2px solid currentColor; + outline-offset: -2px; +} + +.columns-resizing, +.columns-resizing * { + cursor: col-resize !important; + user-select: none; +} + +.columns-sized td { + overflow: hidden; + text-overflow: ellipsis; +} diff --git a/src/components/common/DataTable.vue b/src/components/common/DataTable.vue index 7deb168..c522d57 100644 --- a/src/components/common/DataTable.vue +++ b/src/components/common/DataTable.vue @@ -20,6 +20,7 @@