Fixes: #8866 - Does not perform API Select Search if a django peramiter has not been replaced

This commit is contained in:
Alex Gittings 2022-03-14 17:57:33 +00:00
parent 1add5accf2
commit 3edff89a4d
3 changed files with 6 additions and 3 deletions

Binary file not shown.

Binary file not shown.

View File

@ -557,9 +557,12 @@ export class APISelect {
private async handleSearch(event: Event) { private async handleSearch(event: Event) {
const { value: q } = event.target as HTMLInputElement; const { value: q } = event.target as HTMLInputElement;
const url = queryString.stringifyUrl({ url: this.queryUrl, query: { q } }); const url = queryString.stringifyUrl({ url: this.queryUrl, query: { q } });
await this.fetchOptions(url, 'merge'); if (!url.includes(`{{`)) {
this.slim.data.search(q); await this.fetchOptions(url, 'merge');
this.slim.render(); this.slim.data.search(q);
this.slim.render();
}
return;
} }
/** /**