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 413178d commit eeabc11
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

1 comment on commit eeabc11

@Guoyuanqiang
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

close #461

Please sign in to comment.