File tree Expand file tree Collapse file tree 10 files changed +12
-12
lines changed Expand file tree Collapse file tree 10 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ export class TypeaheadComponent implements OnInit {
6060 */
6161 const normalizedQuery = searchQuery .toLowerCase ();
6262 this .filteredItems = this .items .filter (item => {
63- return item .value .includes (normalizedQuery );
63+ return item .text . toLowerCase () .includes (normalizedQuery );
6464 });
6565 }
6666 }
Original file line number Diff line number Diff line change 108108
109109 const normalizedQuery = searchQuery . toLowerCase ( ) ;
110110
111- return fruits . filter ( fruit => fruit . value . includes ( normalizedQuery ) ) ;
111+ return fruits . filter ( fruit => fruit . text . toLowerCase ( ) . includes ( normalizedQuery ) ) ;
112112 }
113113
114114 /**
Original file line number Diff line number Diff line change 9494
9595 const normalizedQuery = searchQuery .toLowerCase ();
9696
97- return fruits .filter (fruit => fruit .value .includes (normalizedQuery));
97+ return fruits .filter (fruit => fruit .text . toLowerCase () .includes (normalizedQuery));
9898 }
9999
100100 /* *
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ function AppTypeahead(props: TypeaheadProps) {
5959 */
6060 const normalizedQuery = searchQuery .toLowerCase ();
6161 setFilteredItems (props .items .filter (item => {
62- return item .value .includes (normalizedQuery );
62+ return item .text . toLowerCase () .includes (normalizedQuery );
6363 }));
6464 }
6565 }
Original file line number Diff line number Diff line change 8989 */
9090 const normalizedQuery = searchQuery .toLowerCase ();
9191 filteredItems .value = props .items .filter (item => {
92- return item .value .includes (normalizedQuery);
92+ return item .text . toLowerCase () .includes (normalizedQuery);
9393 });
9494 }
9595 }
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import { Item } from './types';
77 selector: ' app-typeahead' ,
88 templateUrl: ' typeahead.component.html' ,
99})
10- export class TypeaheadComponentt implements OnInit {
10+ export class TypeaheadComponent implements OnInit {
1111 @Input () items: Item [] = [];
1212 @Input () selectedItems: string [] = [];
1313 @Input () title = ' Select Items' ;
@@ -60,7 +60,7 @@ export class TypeaheadComponentt implements OnInit {
6060 */
6161 const normalizedQuery = searchQuery .toLowerCase ();
6262 this .filteredItems = this .items .filter (item => {
63- return item .value .includes (normalizedQuery );
63+ return item .text . toLowerCase () .includes (normalizedQuery );
6464 });
6565 }
6666 }
Original file line number Diff line number Diff line change 1313 < body >
1414 < ion-app >
1515 < ion-content color ="light ">
16- < div class ="container ">
16+ < div class ="container ">
1717 < ion-list inset ="true ">
1818 < ion-item button ="true " detail ="false " id ="select-fruits ">
1919 < ion-label > Favorite Fruits</ ion-label >
108108
109109 const normalizedQuery = searchQuery . toLowerCase ( ) ;
110110
111- return fruits . filter ( fruit => fruit . value . includes ( normalizedQuery ) ) ;
111+ return fruits . filter ( fruit => fruit . text . toLowerCase ( ) . includes ( normalizedQuery ) ) ;
112112 }
113113
114114 /**
Original file line number Diff line number Diff line change 9494
9595 const normalizedQuery = searchQuery .toLowerCase ();
9696
97- return fruits .filter (fruit => fruit .value .includes (normalizedQuery));
97+ return fruits .filter (fruit => fruit .text . toLowerCase () .includes (normalizedQuery));
9898 }
9999
100100 /* *
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ function AppTypeahead(props: TypeaheadProps) {
5959 */
6060 const normalizedQuery = searchQuery .toLowerCase ();
6161 setFilteredItems (props .items .filter (item => {
62- return item .value .includes (normalizedQuery );
62+ return item .text . toLowerCase () .includes (normalizedQuery );
6363 }));
6464 }
6565 }
Original file line number Diff line number Diff line change 8888 */
8989 const normalizedQuery = searchQuery .toLowerCase ();
9090 filteredItems .value = props .items .filter (item => {
91- return item .value .includes (normalizedQuery);
91+ return item .text . toLowerCase () .includes (normalizedQuery);
9292 });
9393 }
9494 }
You can’t perform that action at this time.
0 commit comments