Skip to content

Commit

Permalink
chore: use uiPosition in the demos
Browse files Browse the repository at this point in the history
  • Loading branch information
gkubisa committed Jul 29, 2020
1 parent b6151dc commit 1d760bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions demo/ui/ko.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ import ko from 'knockout'
import { TwAutocomplete, createTemplate } from '@teamwork/autocomplete-ui-ko'

export function initUI(autocomplete) {
const context = { autocomplete }
const uiPosition = 'caret'
const context = { autocomplete, uiPosition }
const node = document.getElementById('autocomplete')
node.setAttribute(
'data-bind',
'component:{name:"tw-autocomplete",params:{autocomplete}}',
'component:{name:"tw-autocomplete",params:{autocomplete,uiPosition}}',
)
ko.components.register('tw-autocomplete', {
viewModel: TwAutocomplete,
Expand Down
3 changes: 3 additions & 0 deletions demo/ui/vue.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ export function initUI(autocomplete) {
return 'Type something'
},
},
props: {
uiPosition: 'caret',
},
})
},
})
Expand Down

0 comments on commit 1d760bf

Please sign in to comment.