How to open QSelect dropdown programmatically?
-
Hello All,
I have an issue with QSelect component. I am using the component as shown:
<q-select
ref=“storeTASelect”
multiple filled dense options-dense
v-model=“selected”
@input=“hasChanged”
counter
:max-values=“json.multiselect”
:hint=“getHint”
:disable=“checkStatus”
:options=“selectOptions”>
</q-select>I was able to open the dropdown manually by using refs and calling showPopup() function on QSelect component. “this.$refs.storeTASelect.showPopup();”
It seems a fix was done in release 1.12.9 (fix(QSelect): exit showPopup if it’s not editable #7323). I am no longer able to manually trigger the select dropdown after this fix. Can someone please suggest how to get this dropdown programmatically opened? -
I’m facing the same problem. Did you get it working? Otherwise we’ll need to create an issue about this.
-
looking at the code of q-select, showPopup should still work unless
disable = true or readonly = true
Is that the case in your q-select? Or does it not popup all the time?
-
I have the same problem. I wish q-select had a prop for expanding its options.
-
@hipertracker well it does have, read its api methods section.
-
@metalsadman I tried to find it in the q-select api but found nothing.
-
@dobbel should be
showPopup
, which you already mentioned. -
@metalsadman said in How to open QSelect dropdown programmatically?:
showPopup
It’s not in the ‘public’ api of q-select in the Quasar doc. I found it in the source code.
-
@dobbel it’s in the methods section.
-
@metalsadman Ah I see now what happend. The method tab ran was off my small screen… that arrow is not very intuïtieve UI to me I guess… thanks for clearing that out.