Question 11
Consider the below Vue component.
<template> <div> <ul> <li v-for="item in filteredItems" :key="item.id">{{ item.name }}</li> </ul> </div></template>
<script>export default { data() { return { items: [ { id: 1, name: "Item 1" }, { id: 2, name: "Item 2" }, { id: 3, name: "Item 3" }, ], filterActive: true, }; }, computed: { filteredItems() { return this.filterActive ? this.items.filter((item) => item.id !== 2) : this.items; }, },};</script>What will be displayed in the <ul> when filterActive is true?
Item 1, Item 3
Item 2
Item 1, Item 2, Item 3
The list will be empty.