react-native-multipicker
react-native-multipicker copied to clipboard
bug: selectedValue is ignored, only selectedIndex is working
bug: selectedValue is ignored, only selectedIndex is working
Can you clarify what you mean by "not working" and provide some example code to reproduce?
Just check sources of multi-picker.ios.js (are you author?) - there is such property at all - only selectedIndexes:
React.Children.forEach(props.children, function(child, index) {
var items = []
var selectedIndex = 0;
if (child.props.selectedIndex) {
selectedIndex = child.props.selectedIndex;
}
React.Children.forEach(child.props.children, function(child, idx) {
items.push({label: child.props.label, value: child.props.value});
});
componentData.push(items);
selectedIndexes.push(selectedIndex);
});
return { componentData, selectedIndexes, };