From 25ecb1cb75b7b5b584ad223e12d74c3e3ee7da89 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 12 Feb 2023 13:05:25 +0100 Subject: Add textual search on title, subtitle and authors --- src/lib/rx.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/lib/rx.ts') 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) { -- cgit v1.2.3