ソースを参照

Merge pull request #8870 from minitriga/issue_8866

APISelect JavaScript only perform fetch if Django substitutes have been replaced.
Jeremy Stretch 4 年 前
コミット
e3d0628a06

ファイルの差分が大きいため隠しています
+ 0 - 0
netbox/project-static/dist/netbox.js


ファイルの差分が大きいため隠しています
+ 0 - 0
netbox/project-static/dist/netbox.js.map


+ 6 - 3
netbox/project-static/src/select/api/apiSelect.ts

@@ -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;
   }
 
   /**

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません