Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getAutocompleteAsyncConfig(): IAutocompleteConfig<CoreReportProgram> {
- return {
- searchInputValidators: [Validators.minLength(3)],
- getList: (searchText: string) => this.coreReportService.getProgramList(new CoreReportProgramFilter({ searchText })),
- getProps: (item: CoreReportProgram): IAutocompleteDropdownItem => ({
- name: item.name,
- id: item.id,
- }),
- };
- }
- -----
- <ui-kit-autocomplete
- label="Place"
- placeholder="Place name"
- [resetAutocompleteAfterSelect]="true"
- [asyncConfig]="config"
- [defaultOptionItems]="[]">
- <ng-template #optionTemplate let-venue="itemFromDropdown">
- <event-venue-select-option [venue]="venue"></event-venue-select-option>
- </ng-template>
- <ng-template #inputAdornment>
- <ui-kit-button palette="primary" [ngStyle]="{width: 'max-content'}">
- Add venue
- </ui-kit-button>
- </ng-template>
- </ui-kit-autocomplete>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement