From 7963d6fe245bf4a9e9a1a0e4f59f31b769985911 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 22 Dec 2018 15:59:08 -0500 Subject: [PATCH] fix crud example --- site/content/examples/7guis-crud/App.html | 74 +++++++++++------------ 1 file changed, 35 insertions(+), 39 deletions(-) diff --git a/site/content/examples/7guis-crud/App.html b/site/content/examples/7guis-crud/App.html index d1e49cccc1..82ce893aac 100644 --- a/site/content/examples/7guis-crud/App.html +++ b/site/content/examples/7guis-crud/App.html @@ -1,25 +1,17 @@ + + - - - - - + $: filteredPeople = prefix + ? people.filter(person => { + const name = `${person.last}, ${person.first}`; + return name.toLowerCase().startsWith(prefix.toLowerCase()); + }) + : people; - - + $: selected = filteredPeople[i]; -
- - - -
+ $: if (selected) { + first = selected.first; + last = selected.last; + } + \ No newline at end of file + + + + + + + + + +
+ + + +
\ No newline at end of file