Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onPickerConfirm only returns changed column #68

Closed
JonasWho opened this issue Oct 4, 2016 · 2 comments
Closed

onPickerConfirm only returns changed column #68

JonasWho opened this issue Oct 4, 2016 · 2 comments

Comments

@JonasWho
Copy link

JonasWho commented Oct 4, 2016

I am using the Picker with 8 colums, to create an odometer reader for a car. I have a 6 figure amount with 1 decimal.

My problem is that if I just change 1 column, the onPickerConfirm method returns just that one column that I changed. Example: If I change the initial value from 012633,8 to 012632,8 then the data that onPickerConfirm gives me, is ['0','0','0','0','0','2',',','0']

My exaple code is here:

const pickerData = [
  [0,1,2,3,4,5,6,7,8,9],
  [0,1,2,3,4,5,6,7,8,9],
  [0,1,2,3,4,5,6,7,8,9],
  [0,1,2,3,4,5,6,7,8,9],
  [0,1,2,3,4,5,6,7,8,9],
  [0,1,2,3,4,5,6,7,8,9],
  [','],
  [0,1,2,3,4,5,6,7,8,9]
];
const selectedValue = [0,1,2,6,3,3,',',8];

Picker.init({
      pickerData: pickerData,
      selectedValue: selectedValue,
      pickerConfirmBtnText: 'OK,
      pickerCancelBtnText: 'Cancel',
      pickerTitleText: 'Choose',
      onPickerConfirm: data => {
        console.log(data)
      },
      onPickerCancel: data => {},
      onPickerSelect: data => {}
});
@xwenliang
Copy link
Member

v4.0.3 fixed this bug, thanks!

@JonasWho
Copy link
Author

Perfect, thank YOU :)

rodolphefauquez pushed a commit to Clintal/react-native-picker that referenced this issue Feb 16, 2018
beefe#68)

Rename planType to buttonPlanType in PlanTypeModalButton component
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants