Skip to content

Commit e3d0628

Browse files
Merge pull request #8870 from minitriga/issue_8866
APISelect JavaScript only perform fetch if Django substitutes have been replaced.
2 parents 9fca9ca + 3edff89 commit e3d0628

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

netbox/project-static/dist/netbox.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

netbox/project-static/dist/netbox.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

netbox/project-static/src/select/api/apiSelect.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -557,9 +557,12 @@ export class APISelect {
557557
private async handleSearch(event: Event) {
558558
const { value: q } = event.target as HTMLInputElement;
559559
const url = queryString.stringifyUrl({ url: this.queryUrl, query: { q } });
560-
await this.fetchOptions(url, 'merge');
561-
this.slim.data.search(q);
562-
this.slim.render();
560+
if (!url.includes(`{{`)) {
561+
await this.fetchOptions(url, 'merge');
562+
this.slim.data.search(q);
563+
this.slim.render();
564+
}
565+
return;
563566
}
564567

565568
/**

0 commit comments

Comments
 (0)