Skip to content

Commit

Permalink
api_demo: fix .select examples
Browse files Browse the repository at this point in the history
  • Loading branch information
linroid committed Jan 7, 2020
1 parent a3341d7 commit 56c129a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api_demo/components/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ module.exports = {
title: 'select()',
summary: '$input.select(data: object)',
onClick: async () => {
let option = await $input.select({
let selected = await $input.select({
title: 'Dora.js select',
options: [{
id: 'option2',
Expand All @@ -90,13 +90,13 @@ module.exports = {
title: 'Option 2'
}]
})
$ui.toast(`Selected ${option.title}`)
$ui.toast(`Selected ${JSON.stringify(selected)}`)
}
}, {
title: 'select() mutliple',
summary: '$input.select(data: object)',
onClick: async () => {
let option = await $input.select({
let selected = await $input.select({
title: 'Dora.js select',
multiple: true,
options: [{
Expand All @@ -107,7 +107,7 @@ module.exports = {
title: 'Option 2'
}]
})
$ui.toast(`Selected ${option.title}`)
$ui.toast(`Selected ${JSON.stringify(selected)}`)
}
},
// $router
Expand Down

0 comments on commit 56c129a

Please sign in to comment.