@simsustech/quasar-components 0.9.0 → 0.9.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @simsustech/quasar-components
2
2
 
3
+ ## 0.9.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 0bb7339: fix(FilteredModelSelect): fix fetching of missing modelValue id
8
+
3
9
  ## 0.9.0
4
10
 
5
11
  ### Minor Changes
package/dist/form.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ref, defineComponent, useAttrs, withAsyncContext, watch, openBlock, createBlock, unref, mergeProps, normalizeProps, guardReactiveProps, withCtx, createVNode, createTextVNode, toDisplayString, computed, useSlots, renderSlot, createCommentVNode, toRefs, resolveDirective, createElementBlock, Fragment, renderList, resolveDynamicComponent, createElementVNode, withDirectives, onMounted, createSlots } from "vue";
1
+ import { ref, defineComponent, useAttrs, withAsyncContext, watch, openBlock, createBlock, unref, mergeProps, normalizeProps, guardReactiveProps, withCtx, createVNode, createTextVNode, toDisplayString, computed, useSlots, renderSlot, createCommentVNode, toRefs, resolveDirective, createElementBlock, Fragment, renderList, resolveDynamicComponent, createElementVNode, withDirectives, createSlots } from "vue";
2
2
  import { useQuasar, QSelect, QItem, QItemSection, QItemLabel, QInput, QDate, QIcon, QTooltip, QBtn, QPopupProxy, QField, QEditor } from "quasar";
3
3
  import { e as enUs, n as nl, u as useLang$1 } from "./en-US-BEeILC7o.js";
4
4
  const lang$1 = {
@@ -969,16 +969,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
969
969
  };
970
970
  const selectRef = ref();
971
971
  watch(modelValue, () => {
972
- if (!options.value.length)
973
- emit("filter", {
974
- ids: selectedIds.value,
975
- searchPhrase: "",
976
- done: () => {
977
- }
978
- });
979
- });
980
- onMounted(() => {
981
- if (!options.value.length)
972
+ var _a;
973
+ if (!((_a = options.value) == null ? void 0 : _a.find((val) => val.value === modelValue.value)))
982
974
  emit("filter", {
983
975
  ids: selectedIds.value,
984
976
  searchPhrase: "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simsustech/quasar-components",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "author": "Stefan van Herwijnen",
5
5
  "description": "High level components for Quasar Framework",
6
6
  "license": "MIT",
@@ -37,7 +37,7 @@ export default {
37
37
  generic="T extends { id: number; [key: string]: unknown }"
38
38
  >
39
39
  import { QSelect } from 'quasar'
40
- import { computed, ref, toRefs, useAttrs, watch, onMounted } from 'vue'
40
+ import { computed, ref, toRefs, useAttrs, watch } from 'vue'
41
41
  import { useLang } from './lang/index.js'
42
42
 
43
43
  interface Props {
@@ -132,7 +132,7 @@ const filterFn: QSelect['$props']['onFilter'] = (val, update, abort) => {
132
132
  const selectRef = ref<QSelect>()
133
133
 
134
134
  watch(modelValue, () => {
135
- if (!options.value.length)
135
+ if (!options.value?.find((val) => val.value === modelValue.value))
136
136
  emit('filter', {
137
137
  ids: selectedIds.value,
138
138
  searchPhrase: '',
@@ -140,12 +140,12 @@ watch(modelValue, () => {
140
140
  })
141
141
  })
142
142
 
143
- onMounted(() => {
144
- if (!options.value.length)
145
- emit('filter', {
146
- ids: selectedIds.value,
147
- searchPhrase: '',
148
- done: () => {}
149
- })
150
- })
143
+ // onMounted(() => {
144
+ // if (!options.value?.find((val) => val.value === modelValue.value))
145
+ // emit('filter', {
146
+ // ids: selectedIds.value,
147
+ // searchPhrase: '',
148
+ // done: () => {}
149
+ // })
150
+ // })
151
151
  </script>