Skip to content

Commit

Permalink
doc(demo): improve demo data
Browse files Browse the repository at this point in the history
  • Loading branch information
oocx committed Sep 30, 2018
1 parent db64346 commit e7726a0
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,27 @@ export class AppComponent {

public autocompleteHandler(query: string) {
const autocompleteEntries = [
'Germany', 'United Kingdom', 'United States', 'France', 'Canada', 'Italy', 'Sweden', 'Norway'
'Austria', 'Italy',
'Belgium', 'Latvia',
'Bulgaria', 'Lithuania',
'Croatia', 'Luxembourg',
'Cyprus', 'Malta',
'Czech Republic', 'Netherlands',
'Denmark', 'Poland',
'Estonia', 'Portugal',
'Finland', 'Romania',
'France', 'Slovakia',
'Germany', 'Slovenia',
'Greece', 'Spain',
'Hungary', 'Sweden',
'Ireland', 'United Kingdom'
];

return autocompleteEntries.filter(e => e.startsWith(query));
if (!query) {
return autocompleteEntries;
}

return autocompleteEntries.filter(e => e.toLocaleLowerCase().startsWith(query.toLocaleLowerCase()));
}

public emitError() {
Expand Down

0 comments on commit e7726a0

Please sign in to comment.