@bildvitta/quasar-ui-asteroid 2.23.0-beta.2 → 2.23.0-beta.5
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 +1 -1
- package/src/components/search-box/QasSearchBox.stories.js +4 -0
- package/src/components/select/QasSelect.stories.js +4 -0
- package/src/components/select/QasSelect.vue +1 -1
- package/src/components/select-list/QasSelectList.vue +15 -13
- package/src/mixins/lazy-loading-filter.js +19 -2
package/package.json
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<qas-search-box v-bind="$attrs" class="q-pa-md" :fuse-options="fuseOptions" :list="sortedOptions">
|
|
3
3
|
<template #default="{ results }">
|
|
4
|
-
<q-
|
|
5
|
-
<
|
|
6
|
-
<slot name="item
|
|
7
|
-
<
|
|
8
|
-
<
|
|
4
|
+
<q-list separator>
|
|
5
|
+
<q-item v-for="(item, index) in results" :key="index">
|
|
6
|
+
<slot name="item" v-bind="self">
|
|
7
|
+
<slot name="item-section" :result="item">
|
|
8
|
+
<q-item-section class="items-start text-bold">
|
|
9
|
+
<div :class="labelClass" @click="redirectRoute(item)">{{ item.label }}</div>
|
|
10
|
+
</q-item-section>
|
|
11
|
+
</slot>
|
|
12
|
+
|
|
13
|
+
<q-item-section avatar>
|
|
14
|
+
<slot name="item-action" v-bind="self">
|
|
15
|
+
<qas-btn hide-mobile-label v-bind="setButtonProps(item)" size="sm" @click="handleClick(item)" />
|
|
16
|
+
</slot>
|
|
9
17
|
</q-item-section>
|
|
10
18
|
</slot>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<slot name="item-action" v-bind="self">
|
|
14
|
-
<qas-btn hide-mobile-label v-bind="setButtonProps(item)" size="sm" @click="handleClick(item)" />
|
|
15
|
-
</slot>
|
|
16
|
-
</q-item-section>
|
|
17
|
-
</slot>
|
|
18
|
-
</q-item>
|
|
19
|
+
</q-item>
|
|
20
|
+
</q-list>
|
|
19
21
|
</template>
|
|
20
22
|
</qas-search-box>
|
|
21
23
|
</template>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { decamelize } from 'humps'
|
|
2
|
+
import { isEqual } from 'lodash'
|
|
3
|
+
import { uid } from 'quasar'
|
|
2
4
|
|
|
3
5
|
export default {
|
|
4
6
|
props: {
|
|
@@ -54,7 +56,7 @@ export default {
|
|
|
54
56
|
...defaultParams,
|
|
55
57
|
...params
|
|
56
58
|
},
|
|
57
|
-
decamelizeFieldName:
|
|
59
|
+
decamelizeFieldName: decamelizeFieldName === undefined ? true : decamelizeFieldName
|
|
58
60
|
}
|
|
59
61
|
},
|
|
60
62
|
|
|
@@ -63,7 +65,19 @@ export default {
|
|
|
63
65
|
},
|
|
64
66
|
|
|
65
67
|
$_virtualScrollClassName () {
|
|
66
|
-
|
|
68
|
+
const id = uid()
|
|
69
|
+
return `virtual-scroll-${id}`
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
watch: {
|
|
74
|
+
lazyLoadingProps: {
|
|
75
|
+
handler (value, oldValue) {
|
|
76
|
+
if (isEqual(value, oldValue)) return
|
|
77
|
+
|
|
78
|
+
this.$_resetFilter()
|
|
79
|
+
this.$emit('input', '')
|
|
80
|
+
}
|
|
67
81
|
}
|
|
68
82
|
},
|
|
69
83
|
|
|
@@ -114,7 +128,9 @@ export default {
|
|
|
114
128
|
if (!this.name) throw new Error(this.$_getMissingPropsMessage('name'))
|
|
115
129
|
|
|
116
130
|
this.hasFetchError = false
|
|
131
|
+
|
|
117
132
|
this.isLoading = true
|
|
133
|
+
this.$emit('fetching', true)
|
|
118
134
|
|
|
119
135
|
const { url, params, decamelizeFieldName } = this.$_defaultLazyLoadingProps
|
|
120
136
|
|
|
@@ -148,6 +164,7 @@ export default {
|
|
|
148
164
|
return []
|
|
149
165
|
} finally {
|
|
150
166
|
this.isLoading = false
|
|
167
|
+
this.$emit('fetching', false)
|
|
151
168
|
}
|
|
152
169
|
},
|
|
153
170
|
|