Q-Select doesn't shot passed object #9283
Unanswered
sbscan
asked this question in
General - Components / Directives / etc
Replies: 1 comment
-
I've figured out it's noting to do with Quasar, the problem was my reactive code but .. I have a complain about Quasar Q-Select. We always use key and value in forms. Q-Radio is much more simple to use, when I gave initial key to Q-Radio, it shows the corresponding label. Q-Select not like this, I think it could be much cleaner this way. I define options with keys and labels for Q-Select, when ever I change the key, it should display the label. Simple. Maybe possible?? I missed something?? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm new so confused maybe.
My template is like this:
<q-select v-model="data.select" :options="data.options" label="Label"></q-input>
And I use reactive value like this:
<script setup> import { reactive } from "vue";
cost data = ref({});
data.options = [ { label: "Label 1", value: "Val1" }, { label: "Label 2", value: "Val2" }, ];
data.select = {label: "Label2", value: "Val2"
I'm not trying to give default value, I'm trying to give value from database.
But it's showing empty value. When I select Label 2 I check data.select and it's exactly same as the value I initially give. I've a q-dialog and I set the values before I show dialog. So I believe it's a dome rendering problem, but I couldn't solve.
Beta Was this translation helpful? Give feedback.
All reactions