Commit f50741fd authored by xwenliang's avatar xwenliang

Fix first line bug(iOS) #109

parent 73d001f8
...@@ -324,7 +324,15 @@ ...@@ -324,7 +324,15 @@
NSInteger setline=[_pick selectedRowInComponent:0]; NSInteger setline=[_pick selectedRowInComponent:0];
self.selectthreeAry =[[self.dataDry objectAtIndex:setline]objectForKey:[self.provinceArray objectAtIndex:setline]]; if (setline) {
self.selectthreeAry =[[self.dataDry objectAtIndex:setline]objectForKey:[self.provinceArray objectAtIndex:setline]];
}else{
setline=0;
self.selectthreeAry =[[self.dataDry objectAtIndex:0] objectForKey:[self.provinceArray objectAtIndex:0]];
}
if (self.selectthreeAry) { if (self.selectthreeAry) {
//遍历数组 //遍历数组
...@@ -358,23 +366,12 @@ ...@@ -358,23 +366,12 @@
{ {
NSInteger setline=[_pick selectedRowInComponent:0]; NSInteger setline=[_pick selectedRowInComponent:0];
if (setline) {
self.selectthreeAry =[[self.dataDry objectAtIndex:setline]objectForKey:[self.provinceArray objectAtIndex:setline]]; self.selectthreeAry =[[self.dataDry objectAtIndex:setline]objectForKey:[self.provinceArray objectAtIndex:setline]];
//NSLog(@"%@",_selectthreeAry); //NSLog(@"%@",_selectthreeAry);
if (row<self.selectthreeAry.count) { if (row<self.selectthreeAry.count) {
self.townArray=[[self.selectthreeAry objectAtIndex:row]objectForKey:[self.cityArray objectAtIndex:row]]; self.townArray=[[self.selectthreeAry objectAtIndex:row]objectForKey:[self.cityArray objectAtIndex:row]];
}
}else{
setline=0;
self.selectthreeAry =[[self.dataDry objectAtIndex:0] objectForKey:[self.provinceArray objectAtIndex:0]];
//NSLog(@"%ld",(long)row);
self.townArray=[[self.selectthreeAry objectAtIndex:0]objectForKey:[self.cityArray objectAtIndex:0]];
} }
[pickerView reloadAllComponents]; [pickerView reloadAllComponents];
......
{ {
"name": "react-native-picker", "name": "react-native-picker",
"version": "4.0.15", "version": "4.0.16",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment