aboutsummaryrefslogtreecommitdiff
path: root/src/lib/rx.ts
diff options
context:
space:
mode:
authorJoris2023-02-12 13:05:25 +0100
committerJoris2023-02-12 13:05:25 +0100
commit25ecb1cb75b7b5b584ad223e12d74c3e3ee7da89 (patch)
tree54118b78bd783812725a6a6cd43f3b4d47ffe006 /src/lib/rx.ts
parent31acb6e43c07066e9a5ba404ea6c59201937c05a (diff)
Add textual search on title, subtitle and authors
Diffstat (limited to 'src/lib/rx.ts')
-rw-r--r--src/lib/rx.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/rx.ts b/src/lib/rx.ts
index dbdd3ad..1b41c27 100644
--- a/src/lib/rx.ts
+++ b/src/lib/rx.ts
@@ -328,8 +328,8 @@ function appendChild(state: State, element: Element, child: Child, lastAdded?: N
lastAdded: appendRes.lastAdded
}
} else if (isRx(child)) {
- const rxBase = document.createTextNode("")
- element.append(rxBase)
+ const rxBase = document.createTextNode('')
+ appendNode(element, rxBase, lastAdded)
let appendRes: AppendResult = {
cancel: voidCancel,
remove: voidRemove,
@@ -345,7 +345,10 @@ function appendChild(state: State, element: Element, child: Child, lastAdded?: N
appendRes.cancel()
cancelRx()
},
- remove: appendRes.remove,
+ remove: () => {
+ appendRes.remove()
+ element.removeChild(rxBase)
+ },
lastAdded: appendRes.lastAdded,
}
} else if (child === undefined || child === false) {