소스 검색

Fixes: #8866 - Does not perform API Select Search if a django peramiter has not been replaced

Alex Gittings 3 년 전
부모
커밋
3edff89a4d
3개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. 0 0
      netbox/project-static/dist/netbox.js
  2. 0 0
      netbox/project-static/dist/netbox.js.map
  3. 6 3
      netbox/project-static/src/select/api/apiSelect.ts

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 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;
   }
 
   /**

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.