@v1nt1248/3nclient-lib 0.2.72 → 0.2.74

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@v1nt1248/3nclient-lib",
3
3
  "license": "AGPL-3.0-or-later",
4
4
  "author": "v1nt1248",
5
- "version": "0.2.72",
5
+ "version": "0.2.74",
6
6
  "description": "Library for 3NWeb clients",
7
7
  "type": "module",
8
8
  "files": [
@@ -49,6 +49,16 @@ export function useTable<T extends Ui3nTableBodyBaseItem>(props: Ui3nTableProps<
49
49
  }, '');
50
50
  });
51
51
 
52
+ const unusedPlaceCssStyle = computed(() => {
53
+ if (!props.config?.minHeightUnusedPlace || isNaN(Number(props.config?.minHeightUnusedPlace))) {
54
+ return {};
55
+ }
56
+
57
+ return {
58
+ minHeight: `${Number(props.config?.minHeightUnusedPlace || 0)}px`,
59
+ };
60
+ });
61
+
52
62
  function setFieldAsRowKey() {
53
63
  const { config = {}, body } = props;
54
64
  const { fieldAsRowKey } = config;
@@ -193,7 +203,7 @@ export function useTable<T extends Ui3nTableBodyBaseItem>(props: Ui3nTableProps<
193
203
  }
194
204
  }, {
195
205
  immediate: true,
196
- }
206
+ },
197
207
  );
198
208
 
199
209
  watch(
@@ -207,6 +217,7 @@ export function useTable<T extends Ui3nTableBodyBaseItem>(props: Ui3nTableProps<
207
217
 
208
218
  return {
209
219
  tableEl,
220
+ unusedPlaceCssStyle,
210
221
  currentConfig,
211
222
  visibleColumns,
212
223
  hasGroupActionsRow,
@@ -18,6 +18,7 @@ export type Ui3nTableConfig<T extends Ui3nTableBodyBaseItem, K extends keyof T =
18
18
  columnStyle?: { [P in Omit<K, 'id'> as string | number]: Record<string, string> };
19
19
  fieldAsRowKey?: keyof T;
20
20
  showNoDataMessage?: boolean;
21
+ minHeightUnusedPlace?: number | string;
21
22
  };
22
23
 
23
24
  export type Ui3nTableHeadProps<T extends Ui3nTableBodyBaseItem> = {
@@ -12,6 +12,7 @@
12
12
 
13
13
  const {
14
14
  tableEl,
15
+ unusedPlaceCssStyle,
15
16
  currentConfig,
16
17
  visibleColumns,
17
18
  hasGroupActionsRow,
@@ -183,7 +184,10 @@
183
184
  </div>
184
185
 
185
186
  <!-- table: unused space-->
186
- <div :class="$style.unusedPlace">
187
+ <div
188
+ :class="$style.unusedPlace"
189
+ :style="unusedPlaceCssStyle"
190
+ >
187
191
  <slot name="unused-place" />
188
192
  </div>
189
193
  </div>