Ignite properties now patch lists to capture push/pop events so that when used in a list template the whole list doesn't have to be rerendered. Also cleaned up some code and moved things around.

This commit is contained in:
2020-08-22 16:15:45 -07:00
parent a22d5cc6aa
commit 56530fc966
4 changed files with 154 additions and 27 deletions

View File

@ -35,9 +35,11 @@ class Sheet extends IgniteElement {
new div(
new input().attribute("type", "text").onEnter(this.enter),
new html("<h2>this is before</h2>"),
new list(this.items, (item) => {
return new a(new html(`<h3>${item}</h3>`)).attribute("href", this.href)
}),
new div(
new list(this.items, (item) => {
return new a(new html(`<h3>${item}</h3>`)).attribute("href", this.href)
})
),
new html("<h2>this is after</h2>"),
new html("<h3>---- begin sheet's slot ----<h3>"),
new slot(this),