Reactstrap: FR: Checkbox and radio buttons

Created on 20 Jan 2017  路  3Comments  路  Source: reactstrap/reactstrap

Most helpful comment

dup: #273
As mentioned there, this feature already exists. Because these components are stateful, it is considered outside the scope of this project.
Some documentation is needed to show how the existing components can be used to create what you are wanting to do.

To be clear, all you need to do is use <ButtonGroup>s with <Button>s and set the active props on the button which is selected. That last part is the key to it, but it is where state comes into play and this is not included.
Here is a basic demo of that using the current version of the project: http://www.webpackbin.com/EJKGaQo8z

All 3 comments

dup: #273
As mentioned there, this feature already exists. Because these components are stateful, it is considered outside the scope of this project.
Some documentation is needed to show how the existing components can be used to create what you are wanting to do.

To be clear, all you need to do is use <ButtonGroup>s with <Button>s and set the active props on the button which is selected. That last part is the key to it, but it is where state comes into play and this is not included.
Here is a basic demo of that using the current version of the project: http://www.webpackbin.com/EJKGaQo8z

@TheSharpieOne ps. your webpackbin is no longer there

@aminnaggar webpackbin did an update, here is a new example: https://stackblitz.com/edit/reactstrap-v5beta-zxdfeh?file=Example.js
Note it is just an example, you shouldn't use inline functions in prod for performance reasons.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

smmoosavi picture smmoosavi  路  3Comments

daveonestar picture daveonestar  路  3Comments

dhwrwmgwra picture dhwrwmgwra  路  3Comments

wzup picture wzup  路  3Comments

emlmsc picture emlmsc  路  3Comments