|
|
@ -78,6 +78,8 @@ export class ResourceAutocompleteComponent implements ControlValueAccessor, OnIn |
|
|
@Input() |
|
|
@Input() |
|
|
subType = ResourceSubType.EXTENSION; |
|
|
subType = ResourceSubType.EXTENSION; |
|
|
|
|
|
|
|
|
|
|
|
ResourceSubType = ResourceSubType; |
|
|
|
|
|
|
|
|
resourceFormGroup = this.fb.group({ |
|
|
resourceFormGroup = this.fb.group({ |
|
|
resource: this.fb.control<string|ResourceInfo>(null) |
|
|
resource: this.fb.control<string|ResourceInfo>(null) |
|
|
}); |
|
|
}); |
|
|
@ -210,6 +212,10 @@ export class ResourceAutocompleteComponent implements ControlValueAccessor, OnIn |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
textIsNotEmpty(text: string): boolean { |
|
|
|
|
|
return (text && text.length > 0); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
private fetchResources(searchText?: string): Observable<Array<ResourceInfo>> { |
|
|
private fetchResources(searchText?: string): Observable<Array<ResourceInfo>> { |
|
|
this.searchText = searchText; |
|
|
this.searchText = searchText; |
|
|
return this.resourceService.getResources(new PageLink(50, 0, searchText), ResourceType.JS_MODULE, this.subType, {ignoreLoading: true}).pipe( |
|
|
return this.resourceService.getResources(new PageLink(50, 0, searchText), ResourceType.JS_MODULE, this.subType, {ignoreLoading: true}).pipe( |
|
|
|