Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Side by Side Diff: web/elements/searchable_list.dart

Issue 688503004: Update searchable_list test to run in package bots (Closed) Base URL: git@github.com:dart-lang/searchable-list-sample.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « web/elements/demo_app.html ('k') | web/elements/searchable_list.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 library searchable_list.searchable_list;
6
7 import 'package:polymer/polymer.dart';
8
9 @CustomTag('searchable-list')
10 class SearchableList extends PolymerElement {
11 @observable bool applyAuthorStyles = true;
12 @observable String searchParam;
13 @published List<String> data = [];
14 final List<String> results = toObservable([]);
15
16 SearchableList.created() : super.created();
17
18 attached() {
19 super.attached();
20 results.addAll(data);
21 onPropertyChange(this, #searchParam, search);
22 }
23
24 search() {
25 results.clear();
26 String lower = searchParam.toLowerCase();
27 results.addAll(data.where((d) => d.toLowerCase().contains(lower)));
28 }
29 }
OLDNEW
« no previous file with comments | « web/elements/demo_app.html ('k') | web/elements/searchable_list.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698