Adds simple filter

This commit is contained in:
Julien Lengrand-Lambert
2022-05-25 14:18:20 +02:00
parent 53ca061601
commit f919209e43

View File

@@ -154,7 +154,7 @@ export class WebBrain extends LitElement {
<h2>The content will come here</h2>
<ul>
${this.persons.map((person) =>
${this.persons.filter( p => p[1].name.includes(this.search) ).map((person) =>
html`<li>${person[0]} - ${person[1].name}</li>`
)}
</ul>