Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Commit d3e7808

Browse files
committed
fix so update() will show all the stops
1 parent d09478c commit d3e7808

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

shuttle-stop-picker.html

+3-4
Original file line numberDiff line numberDiff line change
@@ -198,20 +198,19 @@
198198
},
199199
queryChanged: function() {
200200
this.showAll = false;
201-
this.mode = this.query ? 1 : 0;
202201
this.asyncSearch();
203202
},
204203
asyncSearch: function() {
205204
this.searchJob = this.job(this.searchJob, this.search, 300);
206205
},
207206
search: function() {
208-
var q = this.query && this.query.toLowerCase();
207+
var q = this.showAll ? '' : (this.query && this.query.toLowerCase());
208+
this.mode = q ? 1 : 0;
209209
this.groups.forEach(function(g) {
210210
var t = g.stops.length;
211211
var gh = g.name.toLowerCase().indexOf(q) < 0;
212212
g.stops.forEach(function(s) {
213-
s.hidden = !this.showAll &&
214-
s.name.toLowerCase().indexOf(q) < 0 && gh;
213+
s.hidden = s.name.toLowerCase().indexOf(q) < 0 && gh;
215214
}.bind(this));
216215
}.bind(this));
217216
this.fire('shuttle-stops-search');

0 commit comments

Comments
 (0)