File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 bg-color =" white"
1818 label =" license"
1919 clearable
20+ fill-input
21+ hide-selected
22+ input-debounce =" 0"
2023 outlined
2124 standout
2225 use-input
2629 v-bind:error-message =" ''"
2730 v-on:filter =" licenseFilterFunction"
2831 v-on:update:model-value =" setLicense"
29- />
32+ >
33+ <template #no-option >
34+ <q-item >
35+ <q-item-section class =" text-grey" >
36+ No results
37+ </q-item-section >
38+ </q-item >
39+ </template >
40+ </q-select >
3041 </div >
3142
3243 <div id =" form-button-bar" >
3849<script lang="ts">
3950import { defineComponent , ref } from ' vue'
4051import { useCff } from ' ../store/cff'
52+ import { QSelect } from ' quasar'
4153import schema from ' ../schemas/1.2.0/schema.json'
4254import Stepper from ' components/Stepper.vue'
4355import StepperActions from ' components/StepperActions.vue'
@@ -58,17 +70,20 @@ export default defineComponent({
5870 licenses ,
5971 options ,
6072 setLicense ,
61- licenseFilterFunction (val : string , update : (a : unknown ) => void ) {
62- if (val === ' ' ) {
63- update (() => {
64- options .value = licenses
65- })
66- return
67- }
68-
73+ licenseFilterFunction (val : string , update : (a : unknown , b : unknown ) => void ) {
6974 update (() => {
70- const needle = val .toLowerCase ()
71- options .value = licenses .filter (v => v .toLowerCase ().indexOf (needle ) > - 1 )
75+ if (val === ' ' ) {
76+ options .value = licenses
77+ } else {
78+ const needle = val .toLowerCase ()
79+ options .value = licenses .filter (v => v .toLowerCase ().indexOf (needle ) > - 1 )
80+ }
81+ },
82+ (ref : QSelect ) => {
83+ if (val !== ' ' && ref .options !== undefined && ref .options .length > 0 ) {
84+ ref .setOptionIndex (- 1 )
85+ ref .moveOptionSelection (1 , true )
86+ }
7287 })
7388 }
7489 }
You can’t perform that action at this time.
0 commit comments