Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1613] iOS: Picker data binding dosen't work

GitHub Issuen/a
TypeBug
PriorityCritical
StatusResolved
ResolutionCannot Reproduce
Resolution Date2018-09-06T22:13:15.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterAhmed Mohamed
AssigneeFeon Sua Xin Miao
Created2018-04-22T14:11:57.000+0000
Updated2019-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

FileDateSize
Phone 7 Plus - 2018-09-06.png2018-09-06T22:12:53.000+000076579

Comments

  1. Sharif AbuDarda 2018-04-22

    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.
  2. Feon Sua Xin Miao 2018-09-06

    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>
       
  3. Ahmed Mohamed 2019-01-02

    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
    `$.color_picker.reloadColumn($.color_picker.columns[0]);
    after fetching success You've to test that with a real HTTP request, not with local data.

JSON Source