mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -06:00
Merge pull request #8870 from minitriga/issue_8866
APISelect JavaScript only perform fetch if Django substitutes have been replaced.
This commit is contained in:
commit
e3d0628a06
BIN
netbox/project-static/dist/netbox.js
vendored
BIN
netbox/project-static/dist/netbox.js
vendored
Binary file not shown.
BIN
netbox/project-static/dist/netbox.js.map
vendored
BIN
netbox/project-static/dist/netbox.js.map
vendored
Binary file not shown.
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user