mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
fix(editor): Error dropdown in resource locator disappears when search filter is required (#9681)
This commit is contained in:
@@ -410,7 +410,7 @@ export default defineComponent({
|
||||
return this.cachedResponses[this.currentRequestKey] || null;
|
||||
},
|
||||
currentQueryResults(): IResourceLocatorResultExpanded[] {
|
||||
const results = this.currentResponse ? this.currentResponse.results : [];
|
||||
const results = this.currentResponse?.results ?? [];
|
||||
|
||||
return results.map(
|
||||
(result: INodeListSearchItems): IResourceLocatorResultExpanded => ({
|
||||
@@ -648,6 +648,11 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
loadResourcesDebounced() {
|
||||
if (this.currentResponse?.error) {
|
||||
// Clear error response immediately when retrying to show loading state
|
||||
delete this.cachedResponses[this.currentRequestKey];
|
||||
}
|
||||
|
||||
void this.callDebounced(this.loadResources, {
|
||||
debounceTime: 1000,
|
||||
trailing: true,
|
||||
@@ -664,6 +669,11 @@ export default defineComponent({
|
||||
const paramsKey = this.currentRequestKey;
|
||||
const cachedResponse = this.cachedResponses[paramsKey];
|
||||
|
||||
if (this.credentialsNotSet) {
|
||||
this.setResponse(paramsKey, { error: true });
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.requiresSearchFilter && !params.filter) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user