From e2b129bc91cfc27bddb7074658756e18d05403ae Mon Sep 17 00:00:00 2001 From: h0m3us3r Date: Fri, 1 Jan 2021 16:17:00 -0500 Subject: [PATCH] dont autosearch octo for empty name --- .../public/js/Components/Part/Editor/PartEditorWindow.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartEditorWindow.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartEditorWindow.js index f99befb4d..626dfeb80 100644 --- a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartEditorWindow.js +++ b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartEditorWindow.js @@ -140,7 +140,9 @@ Ext.define('PartKeepr.PartEditorWindow', { this.octoPartQueryWindow = Ext.create("PartKeepr.Components.OctoPart.SearchWindow"); this.octoPartQueryWindow.show(); this.octoPartQueryWindow.setPart(this.editor.record); - this.octoPartQueryWindow.startSearch(this.editor.nameField.getValue()); + let name = this.editor.nameField.getValue(); + if (name !== "") + this.octoPartQueryWindow.startSearch(name); this.octoPartQueryWindow.on("refreshData", this.onRefreshData, this); } else { Ext.MessageBox.alert(i18n("Octopart is not configured"), i18n("Your administrator needs to configure the API key for Octopart in the parameters.php file - see parameters.php.dist for instructions"));