fixed a bug in keyboard and browse EditableList(..)...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-08-17 15:40:51 +03:00
parent a145667637
commit 1762192352
2 changed files with 2 additions and 8 deletions

View File

@ -1357,7 +1357,7 @@ var KeyboardUIActions = actions.Actions({
})
var new_keys = code == orig_code ?
keys.filter(function(k){ orig_keys.indexOf(k) < 0 })
keys.filter(function(k){ return orig_keys.indexOf(k) < 0 })
: keys
// add keys...

View File

@ -457,8 +457,6 @@ function(data, options){
: options.isItemHidden,
}
console.log('LIST:', keys)
keys.forEach(function(k){
var txt
var opts = Object.create(options)
@ -715,11 +713,7 @@ function(list, options){
var lst = list instanceof Function ?
list()
: list
var editable = dialog.__editable[id] = lst instanceof Array
// keep editable state...
&& dialog.__editable[id]
// view objects...
var editable = dialog.__editable[id] = lst instanceof Array
// NOTE: we .slice() here to make the changes a bit better packaged
// or discrete and not done as they come in...
lst = lst instanceof Array ? lst.slice() : Object.keys(lst)