Comments (6)
Sorry for late.
I will implement this weekend.
Thank you.
from react-native-simple-radio-button.
I'm working now.
Please wait a little more..
from react-native-simple-radio-button.
Looking forward to your updates soon. Thanks
from react-native-simple-radio-button.
Any news?
from react-native-simple-radio-button.
Sorry for late.
I updated to 2.0.0
You can use like this:
import RadioForm, {RadioButton, RadioButtonInput, RadioButtonLabel} from 'react-native-simple-radio-button';
<Text style={styles.welcome}>3. Pro</Text>
<View style={styles.component}>
<RadioForm formHorizontal={true} animation={true} >
{this.state.types3.map((obj, i) => {
var onPress = (value, index) => {
this.setState({
value3: value,
value3Index: index
})
}
return (
<RadioButton labelHorizontal={true} key={i} >
{/* You can set RadioButtonLabel before RadioButtonInput */}
<RadioButtonInput
obj={obj}
index={i}
isSelected={this.state.value3Index === i}
onPress={onPress}
buttonInnerColor={'#e74c3c'}
buttonOuterColor={'#2196f3'}
buttonSize={40}
buttonStyle={{}}
buttonWrapStyle={{marginLeft: 10}}
/>
<RadioButtonLabel
obj={obj}
index={i}
labelHorizontal={true}
onPress={onPress}
labelStyle={{fontSize: 20, color: '#2ecc71'}}
labelWrapStyle={{}}
/>
</RadioButton>
)
})}
</RadioForm>
</View>
<Text>selected: {this.state.types3[this.state.value3Index].label}</Text>
I also updated example(index.ios.js). Check this.
And, I have not updated README. I will update soon.
Thanks!
from react-native-simple-radio-button.
What if i don't want to save it to state? I have multiple sets of radio buttons. For example, i have a multiple choice form with 50 questions. I can't have all 50 inside a state.
from react-native-simple-radio-button.
Related Issues (20)
- onPress called with different param type
- TestID does not work HOT 2
- I made three radio buttons using pro, the last one is not clickable
- How to style button label in RadioForm
- buttonColor prop not working on selected radio button HOT 1
- Initial is not working on radio form tag HOT 1
- Misleading README.md HOT 1
- how to put a separator in between radio buttons like as shown in customizable example? HOT 1
- Label gets cut off for fontSize > 22
- React.createClass deprecated HOT 1
- make the selected label bold HOT 1
- rtl radio HOT 3
- This lib added totally unwanted animations to my project in Android
- Move radio button to next row if more then 2
- maxFontSizeMultiplier for RadioButtonLabel
- how to bind selected value in initial HOT 1
- setstate of hook inside onPress not working ! HOT 1
- How to reset the value of the radio buttons?
- Is Selected by Value
- Not accessible (a11y)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-simple-radio-button.