File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
apps/app/ui-tests-app/list-picker Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change
1
+ import { ListPicker } from "tns-core-modules/ui/list-picker" ;
2
+ import { Page } from "tns-core-modules/ui/page" ;
3
+
1
4
export function loaded ( args ) {
2
- var items = [ ] ;
5
+ const items = [ ] ;
3
6
for ( var i = 0 ; i < 100 ; i ++ ) {
4
7
items . push ( "name" + i ) ;
5
8
}
6
- args . object . bindingContext = { items : items } ;
7
- }
9
+
10
+ const target = ( < Page > args . object . page ) . getViewById < ListPicker > ( "target" ) ;
11
+ target . items = items ;
12
+ target . selectedIndex = 3 ;
13
+ }
Original file line number Diff line number Diff line change 1
1
<Page loaded =" loaded" >
2
2
<StackLayout >
3
- <ListPicker items =" {{ items }}" style =" color: deeppink; background-color:lightskyblue" />
3
+ <ListPicker id = " target " items =" {{ items }}" style =" color: deeppink; background-color:lightskyblue" />
4
4
</StackLayout >
5
5
</Page >
You can’t perform that action at this time.
0 commit comments