demos/tests...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-02-02 02:37:34 +03:00
parent 06b6e15b91
commit 226a397f3b
2 changed files with 10 additions and 3 deletions

View File

@ -1634,6 +1634,12 @@ var WidgetTestActions = actions.Actions({
make.Heading(' Editable list:')
make.EditableList(editable_list)
make.Heading('More:')
make.Action('Editable list demos...')
.on('open', function(){ actions.testList() })
make.Action('Pinned list demo...')
.on('open', function(){ actions.testPinnedList() })
// NOTE: the dialog's .parent is not yet set at this point...
// This will finalize the dialog...

View File

@ -586,7 +586,9 @@ function(list, options){
// in-place replace list elements...
// NOTE: this is necessary as not everything we do with lst
// is in-place...
: list.splice.apply(list, [0, list.length].concat(lst)))
: list.splice.apply(list, [0, list.length].concat(lst)))
// we need to return the list itself...
&& lst
// in case the list(..) returns nothing...
|| lst
}
@ -814,9 +816,8 @@ function(list, options){
: undefined)
}
lst = write(list, lst)
lst = dialog.__list[id] = write(list, lst)
dialog.__list[id] = lst
// update list and select new value...
dialog.update()