web: fix search loading old results when using enter
This commit is contained in:
parent
5f9c1e229c
commit
77861b52e3
|
@ -144,7 +144,7 @@ export abstract class Table<T> extends LitElement {
|
||||||
<tr role="row">
|
<tr role="row">
|
||||||
<td role="cell" colspan="8">
|
<td role="cell" colspan="8">
|
||||||
<div class="pf-l-bullseye">
|
<div class="pf-l-bullseye">
|
||||||
${inner ? inner : html`<ak-empty-state header="none"></ak-empty-state>`}
|
${inner ? inner : html`<ak-empty-state header="${gettext("No elements found.")}"></ak-empty-state>`}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -26,9 +26,9 @@ export class TableSearch extends LitElement {
|
||||||
if (el.value === "") return;
|
if (el.value === "") return;
|
||||||
this.onSearch(el?.value);
|
this.onSearch(el?.value);
|
||||||
}}>
|
}}>
|
||||||
<input class="pf-c-form-control" name="search" type="search" placeholder="Search..." value="${ifDefined(this.value)}" @search=${() => {
|
<input class="pf-c-form-control" name="search" type="search" placeholder="Search..." value="${ifDefined(this.value)}" @search=${(ev: Event) => {
|
||||||
if (!this.onSearch) return;
|
if (!this.onSearch) return;
|
||||||
this.onSearch("");
|
this.onSearch((ev.target as HTMLInputElement).value);
|
||||||
}}>
|
}}>
|
||||||
<button class="pf-c-button pf-m-control" type="submit">
|
<button class="pf-c-button pf-m-control" type="submit">
|
||||||
<i class="fas fa-search" aria-hidden="true"></i>
|
<i class="fas fa-search" aria-hidden="true"></i>
|
||||||
|
|
Reference in New Issue