@pequity/squirrel 5.4.3 → 5.4.4

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.
@@ -20,10 +20,12 @@ const usePTableRowVirtualizer = (options) => {
20
20
  );
21
21
  const measureElement = (cmp) => {
22
22
  const el = vue.isRef(cmp) ? vue.unref(cmp) : cmp == null ? void 0 : cmp.$el;
23
- if (!el) {
24
- return;
25
- }
26
- virtualizer.value.measureElement(el);
23
+ vue.nextTick(() => {
24
+ if (!el) {
25
+ return;
26
+ }
27
+ virtualizer.value.measureElement(el);
28
+ });
27
29
  return void 0;
28
30
  };
29
31
  return { virtualizer, virtualRows, paddingTop, paddingBottom, measureElement };
@@ -1,4 +1,4 @@
1
- import { ref, computed, isRef, unref } from "vue";
1
+ import { ref, computed, isRef, unref, nextTick } from "vue";
2
2
  import { useVirtualizer } from "@tanstack/vue-virtual";
3
3
  const usePTableRowVirtualizer = (options) => {
4
4
  if (!options.value) {
@@ -18,10 +18,12 @@ const usePTableRowVirtualizer = (options) => {
18
18
  );
19
19
  const measureElement = (cmp) => {
20
20
  const el = isRef(cmp) ? unref(cmp) : cmp == null ? void 0 : cmp.$el;
21
- if (!el) {
22
- return;
23
- }
24
- virtualizer.value.measureElement(el);
21
+ nextTick(() => {
22
+ if (!el) {
23
+ return;
24
+ }
25
+ virtualizer.value.measureElement(el);
26
+ });
25
27
  return void 0;
26
28
  };
27
29
  return { virtualizer, virtualRows, paddingTop, paddingBottom, measureElement };
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@pequity/squirrel",
3
3
  "description": "Squirrel component library",
4
- "version": "5.4.3",
5
- "packageManager": "pnpm@9.12.1",
4
+ "version": "5.4.4",
5
+ "packageManager": "pnpm@9.12.2",
6
6
  "type": "module",
7
7
  "scripts": {
8
8
  "preinstall": "npx only-allow pnpm",
@@ -53,26 +53,26 @@
53
53
  "@commitlint/cli": "^19.5.0",
54
54
  "@commitlint/config-conventional": "^19.5.0",
55
55
  "@pequity/eslint-config": "^0.0.13",
56
- "@playwright/test": "^1.48.0",
56
+ "@playwright/test": "^1.48.1",
57
57
  "@popperjs/core": "2.11.8",
58
58
  "@semantic-release/changelog": "^6.0.3",
59
59
  "@semantic-release/git": "^10.0.1",
60
- "@storybook/addon-a11y": "^8.3.5",
61
- "@storybook/addon-actions": "^8.3.5",
62
- "@storybook/addon-essentials": "^8.3.5",
63
- "@storybook/addon-interactions": "^8.3.5",
64
- "@storybook/addon-links": "^8.3.5",
65
- "@storybook/blocks": "^8.3.5",
66
- "@storybook/manager-api": "^8.3.5",
67
- "@storybook/test": "^8.3.5",
60
+ "@storybook/addon-a11y": "^8.3.6",
61
+ "@storybook/addon-actions": "^8.3.6",
62
+ "@storybook/addon-essentials": "^8.3.6",
63
+ "@storybook/addon-interactions": "^8.3.6",
64
+ "@storybook/addon-links": "^8.3.6",
65
+ "@storybook/blocks": "^8.3.6",
66
+ "@storybook/manager-api": "^8.3.6",
67
+ "@storybook/test": "^8.3.6",
68
68
  "@storybook/test-runner": "^0.19.1",
69
- "@storybook/theming": "^8.3.5",
70
- "@storybook/vue3": "^8.3.5",
71
- "@storybook/vue3-vite": "^8.3.5",
69
+ "@storybook/theming": "^8.3.6",
70
+ "@storybook/vue3": "^8.3.6",
71
+ "@storybook/vue3-vite": "^8.3.6",
72
72
  "@tanstack/vue-virtual": "3.10.8",
73
73
  "@types/jsdom": "^21.1.7",
74
74
  "@types/lodash-es": "^4.17.12",
75
- "@types/node": "^22.7.5",
75
+ "@types/node": "^22.7.6",
76
76
  "@vitejs/plugin-vue": "^5.1.4",
77
77
  "@vitest/coverage-v8": "^2.1.3",
78
78
  "@vue/compiler-sfc": "3.5.12",
@@ -94,9 +94,9 @@
94
94
  "prettier-plugin-tailwindcss": "^0.6.8",
95
95
  "resolve-tspaths": "^0.8.22",
96
96
  "rimraf": "^6.0.1",
97
- "sass": "^1.79.5",
97
+ "sass": "^1.80.2",
98
98
  "semantic-release": "^24.1.2",
99
- "storybook": "^8.3.5",
99
+ "storybook": "^8.3.6",
100
100
  "svgo": "^3.3.2",
101
101
  "tailwindcss": "^3.4.14",
102
102
  "typescript": "5.6.3",
@@ -1,4 +1,4 @@
1
- import { type ComponentPublicInstance, type ComputedRef, type Ref, computed, isRef, ref, unref } from 'vue';
1
+ import { type ComponentPublicInstance, type ComputedRef, type Ref, computed, isRef, nextTick, ref, unref } from 'vue';
2
2
  import { useVirtualizer } from '@tanstack/vue-virtual';
3
3
 
4
4
  type Options = ComputedRef<{
@@ -35,11 +35,13 @@ export const usePTableRowVirtualizer = (options: Options) => {
35
35
  const measureElement = (cmp: ComponentPublicInstance | Ref<HTMLElement>) => {
36
36
  const el = isRef(cmp) ? unref(cmp) : cmp?.$el;
37
37
 
38
- if (!el) {
39
- return;
40
- }
38
+ nextTick(() => {
39
+ if (!el) {
40
+ return;
41
+ }
41
42
 
42
- virtualizer.value.measureElement(el);
43
+ virtualizer.value.measureElement(el);
44
+ });
43
45
 
44
46
  return undefined;
45
47
  };