mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-18 10:16:34 +00: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
2
netbox/project-static/dist/netbox.js
vendored
2
netbox/project-static/dist/netbox.js
vendored
File diff suppressed because one or more lines are too long
2
netbox/project-static/dist/netbox.js.map
vendored
2
netbox/project-static/dist/netbox.js.map
vendored
File diff suppressed because one or more lines are too long
@ -557,10 +557,13 @@ export class APISelect {
|
||||
private async handleSearch(event: Event) {
|
||||
const { value: q } = event.target as HTMLInputElement;
|
||||
const url = queryString.stringifyUrl({ url: this.queryUrl, query: { q } });
|
||||
if (!url.includes(`{{`)) {
|
||||
await this.fetchOptions(url, 'merge');
|
||||
this.slim.data.search(q);
|
||||
this.slim.render();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the user has scrolled to the bottom of the options list. If so, try to load
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user