Feature/picker component#56
Conversation
…nent of react-native-paper
Codecov Report
@@ Coverage Diff @@
## develop #56 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 57 60 +3
Lines 310 384 +74
Branches 32 36 +4
=========================================
+ Hits 310 384 +74
Continue to review full report at Codecov.
|
picker component tests added
…ct-native-picker android
| selectedValue: string, | ||
| styles: PickerStyles, | ||
| label: string, | ||
| mode: 'modal' | 'actionSheet'; |
There was a problem hiding this comment.
Make actionsheet all lower case
| container: { | ||
| backgroundColor: '#fff', | ||
| borderColor: '#ddd', | ||
| borderTopWidth: 0.5, |
There was a problem hiding this comment.
the colors are hard coded because android does not have any actionsheet effect so just to make it applicable i have made in modal and poped up through bottom
There was a problem hiding this comment.
So what happens on dark theme? We cannot hardcode Colors. Or themeing will not work
|
|
||
| static defaultStyles = (_theme: Theme) => ({ | ||
| container: { | ||
| backgroundColor: '#fff', |
There was a problem hiding this comment.
Why are colours hard coded
|
On a deeper look, the implementation is wrong. This should be the usage: <Picker
selectedValue={this.state.language}
style={{height: 50, width: 100}}
onValueChange={(itemValue, itemIndex) =>
this.setState({language: itemValue})
}>
<Picker.Item label="Java" value="java" />
<Picker.Item label="JavaScript" value="js" />
</Picker>Remember, the api cannot change from the official version: |
can u please explain as i have implemented things based on using picker component however we have listItem on modal popup as we discussed |
|
@adnan1naeem it's better if you first finish this: BlueBaseJS/plugin-material-ui#80 |
|
As for |
the default mode is the menu mode actually i have already implemented it |
Picker component with different modes modal,actionSheet and Menu for android and ios.
1:picker with mode modal popup opens and you can select items through listItem in android and ios
2:picker mode actionsheet : the picker opens in actionsheet in ios and android
3: default mode or menu the picker opens in Menu mode in ios and android