schummar-table 0.50.0 → 0.50.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -3107,6 +3107,7 @@ function ResizeHandle() {
3107
3107
  const table = useTableContext();
3108
3108
  const columnId = useColumnContext();
3109
3109
  const enabled = table.useState((state) => state.props.enableColumnResize);
3110
+ const hasFilter = table.useState((state) => state.filters.get(columnId) !== void 0);
3110
3111
  function onPointerDown(event) {
3111
3112
  event.stopPropagation();
3112
3113
  event.target.setPointerCapture(event.pointerId);
@@ -3116,7 +3117,8 @@ function ResizeHandle() {
3116
3117
  const div = event.target;
3117
3118
  if (!div.hasPointerCapture(event.pointerId)) return;
3118
3119
  const parent = div.parentElement;
3119
- const width = Math.max(event.clientX - parent.getBoundingClientRect().left + 5, 50);
3120
+ const minWidth = hasFilter ? 80 : 50;
3121
+ const width = Math.max(event.clientX - parent.getBoundingClientRect().left + 5, minWidth);
3120
3122
  table.update((state) => {
3121
3123
  state.columnWidths.set(columnId, `${width}px`);
3122
3124
  });