Skip to content

Commit

Permalink
docs(demos): address PR feedback, fix merge error
Browse files Browse the repository at this point in the history
  • Loading branch information
amcdnl committed Jul 11, 2017
1 parent e72ab91 commit 5d966d0
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class AutocompleteDisplayExample {

filter(name: string): User[] {
return this.options.filter(option =>
option.name.toLowerCase().indexOf(name.toLowerCase()) > -1);
option.name.toLowerCase().indexOf(name.toLowerCase()) === 0);
}

displayFn(user: User): string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class AutocompleteFilterExample {

filter(val: string): string[] {
return this.options.filter(option =>
option.toLowerCase().indexOf(val.toLowerCase()) > -1);
option.toLowerCase().indexOf(val.toLowerCase()) === 0);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class AutocompleteOverviewExample {

filterStates(name: string) {
return this.states.filter(state =>
state.name.toLowerCase().indexOf(name.toLowerCase()) > -1);
state.name.toLowerCase().indexOf(name.toLowerCase()) === 0);
}

}
2 changes: 0 additions & 2 deletions src/material-examples/example-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ export const EXAMPLE_COMPONENTS = {
title: 'Display value autocomplete',
component: AutocompleteDisplayExample
},
'button-overview': {title: 'Basic buttons', component: ButtonOverviewExample},
'button-types': {title: 'Button varieties', component: ButtonTypesExample},
'button-overview': {
title: 'Basic buttons',
component: ButtonOverviewExample,
Expand Down

0 comments on commit 5d966d0

Please sign in to comment.