nuxt-hs-ui 2.1.15 → 2.1.17

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/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.15.0"
6
6
  },
7
- "version": "2.1.15",
7
+ "version": "2.1.17",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
@@ -151,8 +151,8 @@ const isChangeData = computed(() => {
151
151
  const displayData = ref<DisplaySelectItem | null>(null);
152
152
  watch(displayData, (v) => {
153
153
  const before = props.data;
154
- if (v === before) return;
155
154
  if (v === null) {
155
+ if (before === null) return;
156
156
  emit("update:data", null);
157
157
  emit("value-change", null, before);
158
158
  return;
@@ -161,6 +161,7 @@ watch(displayData, (v) => {
161
161
  displayData.value = null;
162
162
  return;
163
163
  }
164
+ if (v.id === before) return;
164
165
  emit("update:data", v.id);
165
166
  emit("value-change", v.id, before);
166
167
  });
@@ -42,7 +42,7 @@ type Props = {
42
42
  | "decimal"
43
43
  | undefined;
44
44
  // ----------------------------------------------------------------------------
45
- data: string;
45
+ data: string | null;
46
46
  diff?: string | undefined;
47
47
  tabindex?: string | undefined;
48
48
  // ----------------------------------------------------------------------------
@@ -173,7 +173,7 @@ const updateValue = async (text: string | null) => {
173
173
  state.value = setText;
174
174
  emit("update:data", setText);
175
175
  await nextTick();
176
- emit("value-change", setText, before);
176
+ emit("value-change", setText, before || "");
177
177
  };
178
178
 
179
179
  const setValue = (text: string | null) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-hs-ui",
3
- "version": "2.1.15",
3
+ "version": "2.1.17",
4
4
  "description": "My new Nuxt module",
5
5
  "repository": "https://github.com/hare-systems-ryo/nuxt-hs-ui",
6
6
  "license": "MIT",