@caido-utils/components 0.5.1 → 0.5.2

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.
@@ -4,7 +4,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<__VLS_With
4
4
  field: string;
5
5
  header: string;
6
6
  sortable?: boolean;
7
- style?: Record<string, string>;
7
+ width?: string;
8
8
  }[];
9
9
  rowHeight?: number;
10
10
  selectable?: boolean | "single" | "multiple";
@@ -27,7 +27,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<__VLS_With
27
27
  field: string;
28
28
  header: string;
29
29
  sortable?: boolean;
30
- style?: Record<string, string>;
30
+ width?: string;
31
31
  }[];
32
32
  rowHeight?: number;
33
33
  selectable?: boolean | "single" | "multiple";
@@ -22,7 +22,7 @@ type ColumnDef = {
22
22
  field: string;
23
23
  header: string;
24
24
  sortable?: boolean;
25
- style?: Record<string, string>;
25
+ width?: string;
26
26
  };
27
27
 
28
28
  const props = withDefaults(
@@ -265,7 +265,7 @@ const columnPt = {
265
265
  stripedRows
266
266
  :virtualScrollerOptions="{ itemSize: props.rowHeight }"
267
267
  resizableColumns
268
- columnResizeMode="fit"
268
+ columnResizeMode="expand"
269
269
  rowHover
270
270
  :rowClass="activeRowClass"
271
271
  :pt="tablePt"
@@ -291,7 +291,7 @@ const columnPt = {
291
291
  :field="col.field"
292
292
  :header="col.header"
293
293
  :sortable="col.sortable"
294
- :style="{ height: `${props.rowHeight}px`, ...col.style }"
294
+ :style="col.width ? { height: `${props.rowHeight}px`, width: col.width, minWidth: col.width, maxWidth: col.width } : { height: `${props.rowHeight}px` }"
295
295
  :pt="columnPt"
296
296
  >
297
297
  <template v-if="col.sortable" #sorticon="{ sorted, sortOrder }">
@@ -4,7 +4,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<__VLS_With
4
4
  field: string;
5
5
  header: string;
6
6
  sortable?: boolean;
7
- style?: Record<string, string>;
7
+ width?: string;
8
8
  }[];
9
9
  rowHeight?: number;
10
10
  selectable?: boolean | "single" | "multiple";
@@ -27,7 +27,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<__VLS_With
27
27
  field: string;
28
28
  header: string;
29
29
  sortable?: boolean;
30
- style?: Record<string, string>;
30
+ width?: string;
31
31
  }[];
32
32
  rowHeight?: number;
33
33
  selectable?: boolean | "single" | "multiple";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caido-utils/components",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"