Hi there, I'm still learning vue js and could use some help. I'm trying to retrieve the value of 'option-value' in q-select by passing 'department_id' in my functions. I am currently using quasar. However, whenever I run this code, it displays as undefined. What is the correct way to pass and display the data?
<div class="col-3">
<q-select
v-model="model"
:options="branches"
multiple
use-chips
option-value="department_id"
option-label="full_branchdept_name"
label="Branch Department"
class="select-branch-department"
outlined dense />
</div>
<!-- :options="[]" -->
<div class="col-9 q-mb-md">
<!-- <div class="float-right">
<q-btn label="Generate from all device" class="bg-custom-orange text-capitalize text-white"></q-btn>
</div> -->
<div class="float-left">
<q-btn color="primary"
class="fetch-branch-department"
label="FETCH"
@click="showFilteredEmployees(department_id)"
/>
</div>
Here's a snippet of my vue file:
methods: {
showFilteredEmployees(department_id){
console.log(department_id); // when executed, it returns as undefined
}
}