I have a select element with options, which loops through an array of objects (services).
<select placeholder="Vælg ydelse">
<option v-for="service in services" :key="service.id">
{{service.name}}
</option>
</select>
In my data object, I have
chosenService: {
id: 42,
name: "some service",
group: {
id: 2,
name: "some group within the service",
},
additions: [],
classSignupMoreActive: false,
},
Which I'd like to be retrieved once the select is changed.
Finally, I'm sending the services array from the parent, as all of this is happening in a component. I'm not sure if this is the most correct way to do it.
Like this:
<Modal
:show="showModal"
@close="showModal = false"
title="Modal Title"
:services="this.services"
>
</Modal>