forked from 0x2620/oxjs
make map zoom work while list has focus
This commit is contained in:
parent
05af51f76b
commit
74802d284a
5 changed files with 19 additions and 3 deletions
|
|
@ -1282,7 +1282,7 @@ Ox.List = function(options, self) {
|
|||
} else if (key == 'selected') {
|
||||
Ox.print('setOption selected', value)
|
||||
setSelected(value);
|
||||
triggerSelectEvent();
|
||||
triggerSelectEvent(); // fixme: added to make text list find-as-you-type work, may break other things
|
||||
} else if (key == 'sort') {
|
||||
Ox.print('---sort---')
|
||||
updateSort();
|
||||
|
|
|
|||
|
|
@ -485,12 +485,14 @@ Ox.TextList = function(options, self) {
|
|||
// fixme: works only if items are an array
|
||||
var query = data.keys,
|
||||
sort = self.options.sort[0];
|
||||
Ox.print('QUERY', query)
|
||||
Ox.forEach(self.options.items, function(item, i) {
|
||||
var value = (
|
||||
sort.map ? sort.map(item[sort.key]) : item[sort.key]
|
||||
).toLowerCase();
|
||||
if (Ox.startsWith(value, query)) {
|
||||
that.$body.options({selected: [item[self.unique]]});
|
||||
Ox.print('QUERY', query, 'VALUE', value)
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue