Merge pull request #8870 from minitriga/issue_8866

APISelect JavaScript only perform fetch if Django substitutes have been replaced.
This commit is contained in:
Jeremy Stretch 2022-03-30 15:37:14 -04:00 committed by GitHub
commit e3d0628a06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) {
const { value: q } = event.target as HTMLInputElement;
const url = queryString.stringifyUrl({ url: this.queryUrl, query: { q } });
await this.fetchOptions(url, 'merge');
this.slim.data.search(q);
this.slim.render();
if (!url.includes(`{{`)) {
await this.fetchOptions(url, 'merge');
this.slim.data.search(q);
this.slim.render();
}
return;
}
/**