1👍
✅
For my understading: You wanna type in any ticket ID inside the input-field and depending on the ticket ID the rooms should be shown that are connected with the ticket ID?
You have to filter the state by the ticketID. Use: return this.rooms.filter(room => room.ticketID === this.ticketID)
as a computed prop. Add ticketID
to your data-section and mount v-model in your input to the ticketID. And of course call your computed prop in the template to show the filtered data (with v-for because filter() returns an array).
Source:stackexchange.com