BeginnerCoder

Lesson 16 — Filtered list

Live search

A search box is v-model plus a computed filter: the computed reads the query and returns only matching items, and the list re-renders as you type. Lower-casing both sides makes the match case-insensitive; includes checks whether one string contains another.

"Bella".toLowerCase().includes("be") // true

Why it matters: filtering contacts, products or settings as you type is a feature users expect everywhere.

Want it another way?
Task

Make shown keep only names that contain the query (ignoring case). Typing be should leave Ben and Bella.

← Back
Next →
Test your knowledge

A quick 3-question quiz on this lesson — instant feedback.

Enjoying this lesson? Share it.

Keep going with Vue.js Foundations

Ready for more? Optional paid resources that pick up where this lesson leaves off.

Some links on this page are affiliate links: we may earn a commission at no extra cost to you. As an Amazon Associate I earn from qualifying purchases.