@mptw/skylens-ui 1.4.105 → 1.4.107

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.
@@ -95,13 +95,7 @@ export default defineComponent({
95
95
  });
96
96
  const isChecked = computed(() => {
97
97
  if (Array.isArray(modelValue.value)) {
98
- let found = false;
99
- modelValue.value.forEach((v) => {
100
- if (isEqual(v, value.value)) {
101
- found = true;
102
- }
103
- });
104
- return found;
98
+ return modelValue.value.find((v) => isEqual(v, value.value));
105
99
  }
106
100
  return modelValue.value === trueValue.value;
107
101
  });
@@ -111,22 +105,22 @@ export default defineComponent({
111
105
  return;
112
106
  }
113
107
 
114
- const isChecked = (e.target as HTMLInputElement).checked;
108
+ const isTargetChecked = (e.target as HTMLInputElement).checked;
115
109
 
116
110
  if (Array.isArray(modelValue.value)) {
117
111
  let newValue = [...modelValue.value];
118
112
 
119
- if (isChecked) {
113
+ if (isTargetChecked) {
120
114
  newValue.push(value.value);
121
115
  } else {
122
- newValue = newValue.filter((v) => v !== value.value);
116
+ newValue = newValue.filter((v) => !isEqual(v, value.value));
123
117
  }
124
118
 
125
119
  emit("update:modelValue", newValue);
126
120
  } else {
127
121
  emit(
128
122
  "update:modelValue",
129
- isChecked ? trueValue.value : falseValue.value
123
+ isTargetChecked ? trueValue.value : falseValue.value
130
124
  );
131
125
  }
132
126
  }
@@ -250,6 +250,7 @@ export default defineComponent({
250
250
  popperInstance = createPopper(selectEl.value, popupComp.value?.$el, {
251
251
  placement: placement.value as Placement,
252
252
  modifiers: [{ name: "eventListeners", enabled: false }],
253
+ strategy: "fixed",
253
254
  });
254
255
  }
255
256
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mptw/skylens-ui",
3
3
  "type": "module",
4
- "version": "1.4.105",
4
+ "version": "1.4.107",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",