[ALOY-1613] iOS: Picker data binding dosen't work
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Critical |
| Status | Resolved |
| Resolution | Cannot Reproduce |
| Resolution Date | 2018-09-06T22:13:15.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | n/a |
| Labels | n/a |
| Reporter | Ahmed Mohamed |
| Assignee | Feon Sua Xin Miao |
| Created | 2018-04-22T14:11:57.000+0000 |
| Updated | 2019-01-02T19:13:56.000+0000 |
Description
Can't use data binding on iOS picker like the Android picker!
<Picker id="city_picker" >
<Column dataCollection="citiesAPI">
<Row cityID="{id}" title="{city}" />
</Column>
</Picker>
Alloy.Collections.citiesAPI.fetch();
Attachments
| File | Date | Size |
|---|---|---|
| Phone 7 Plus - 2018-09-06.png | 2018-09-06T22:12:53.000+0000 | 76579 |
Hello, Please provide a full reproducible core that regenerates the issue. Perhaps with a sample project that we can use to test the issue. Thanks.
Attached a screenshot of the UI, collection binding works as expected. Please reopen with a reproducible app if you are still having the issue.
<Alloy> <Collection src="color"/> <Window> <Picker id="color_picker" > <Column dataCollection="color"> <Row title="{name}" /> </Column> </Picker> </Window> </Alloy>The picker data doesn't change when data is fetched after the picker rendered. you should get the data first then you've to create a picker and put the data in. So the trick is call
after fetching success You've to test that with a real HTTP request, not with local data.