Skip to content

Commit

Permalink
fix(module:picker): fix return result error (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
nuonuoge authored and Guoyuanqiang committed Jun 3, 2019
1 parent c3adf7e commit aa9a901
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions components/picker/picker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,12 @@ export class PickerComponent implements OnInit, AfterViewInit, OnDestroy {
this.checkArrayDeep(this.dataForRender[target][index]);
if (this.selectedTarget.length > 0 && this.selectedTarget.length < this.dataForRender.length) {
for (let i = 0; i < this.dataForRender.length; i++) {
if (target !== i) {
this.selectedTarget.push({ targetId: `${i}`, currentY: 0 });
if (i > target) {
if (i < this.selectedTarget.length) {
this.selectedTarget[i] = { targetId: `${i}`, currentY: 0 };
} else {
this.selectedTarget.push({ targetId: `${i}`, currentY: 0 });
}
}
}
}
Expand Down

0 comments on commit aa9a901

Please sign in to comment.