Feature request: Dynamic items on chips autocomplete list
See original GitHub issueDo you want to request a feature or report a bug?
Feature Request
Allow the items to be loaded as result of an async. service request depending on the current user input
What is the expected behavior?
The items displayed on the autocomplete list are loaded from server depending on the user input.
What is the motivation / use case for changing the behavior?
Lets say that I have a list on my backend made of 1000 elements or more, that I want to suggest to the user as possible match for his input. I dont want to load the 1000 elements on component creation, instead, I would like to load sections of it that match his current input.
Other information
For this to work I think It would be required to implement an @Output property for the input/keypress event (that ignores the enter key), that allows a programmer to change the elements given to the td-chips component.
For example:
<td-chips placeholder="Enter something" [(ngModel)]="input" [items]="items$ | async" (onInput)="handleInput($event)" requireMatch></td-chips>
export class SomePresentationComponent {
items$: Observable<string[]>;
input : string[];
constructor(private _service: SomeService){
this.input = [];
this.items$ = of([]);
}
// Event contains the current value on the input field of the chips element
handleInput(event: string){
this.items$ = this._service.getOnDemand(event);
}
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Autocomplete component - Vuetify
The v-autocomplete component offers simple and flexible ... In this example we add a profile picture for both the chips and list items....
Read more >Handle change on Autocomplete Component from material ui
For anyone that has a problem with displaying a selected item from the dropdown in the Input field. I found a workaround. Basically,...
Read more >Chips | Angular Material
Chips allow users to view information, make selections, filter content, and enter data. link Static Chips. Chips are always used inside a container....
Read more >autocomplete does not stick when scrolling #10079 - GitHub
On using cdkScrollable the dropdown section is sticking to the input, but it is no more contained within the dialog content section. Reproduced ......
Read more >Chips Autocomplete - StackBlitz
<mat-form-field class="example-chip-list"> · <mat-chip-list #chipList aria-label="Fruit · selection"> · <mat-chip · *ngFor="let fruit of fruits" · [selectable]=" ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

nice, considering the added functionalities a minor breaking change as exchange for it sounds fair to me 😃
https://github.com/Teradata/covalent/pull/626 will take care of this 😄 . There is a minor breaking change (behavior change) 😢 , but its gonna add more flexibility.