diff options
author | Joris | 2023-02-12 13:05:25 +0100 |
---|---|---|
committer | Joris | 2023-02-12 13:05:25 +0100 |
commit | 25ecb1cb75b7b5b584ad223e12d74c3e3ee7da89 (patch) | |
tree | 54118b78bd783812725a6a6cd43f3b4d47ffe006 /src/lib/rx.ts | |
parent | 31acb6e43c07066e9a5ba404ea6c59201937c05a (diff) |
Add textual search on title, subtitle and authors
Diffstat (limited to 'src/lib/rx.ts')
-rw-r--r-- | src/lib/rx.ts | 9 |
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) { |