web: fix event propagation in search-select wrappers (#8224)

web: fix event propogation in search-select wrappers

Two different patches, an older one that extracted long search
blocks that were cut-and-pasted into a standalone component, and a
newer one that fixed displaying placeholder values properly,
conflicted and broke a relationship that allowed for the values to
be propagated through those standalone components correctly.

This restores the event handling and updates the listener set-ups
with more idiomatic hooks into Lit's event system.
This commit is contained in:
Ken Sternberg
2024-01-18 08:28:43 -08:00
committed by GitHub
parent 86bf75fe54
commit abf1f0e348
6 changed files with 6 additions and 4 deletions

View File

@ -74,7 +74,6 @@ export class FlowSearch<T extends Flow> extends CustomListenerElement(AKElement)
this.fetchObjects = this.fetchObjects.bind(this);
this.selected = this.selected.bind(this);
this.handleSearchUpdate = this.handleSearchUpdate.bind(this);
this.addCustomListener("ak-change", this.handleSearchUpdate);
}
handleSearchUpdate(ev: CustomEvent) {
@ -124,6 +123,7 @@ export class FlowSearch<T extends Flow> extends CustomListenerElement(AKElement)
.renderDescription=${renderDescription}
.value=${getFlowValue}
.name=${this.name}
@ak-change=${this.handleSearchUpdate}
?blankable=${!this.required}
>
</ak-search-select>