Comments (5)
Just released 2.3.0, it does include the resize prop. I am going to leave this open until I have updated the tests accordingly. Thanks for the catch.
from react-bootstrap-toggle.
What kind of a browser are you using? I admit I only test in Chrome and Firefox.
In what way is it buggy?
I think you could just return false from the onclick handler to at least not toggle the states.
If you give me a better description I can check this out tonight.
from react-bootstrap-toggle.
Thanks for your comment, I've closed the report since it's irrelevant.
The bug is when you're using the ToggleButton with react bootstrap tabs, the ToggleButton can't find it's css height so it turns out bad and "buggy"
The solution is to update the ToggleButton component after the ToggleButton's tab was selected
from react-bootstrap-toggle.
Ah, I understand. It's rendered with no dimensions and when the visibility is toggled it does not recalculate the width and height.
I will add resize observer to the toggle as a prop.
<Toggle
{...restOfProps}
recalculateOnResize={true}
/>
That way you don't have to manually update the component.
from react-bootstrap-toggle.
That's really nice :)
I just added a style tag to the component to have a fixed size such as
<Toggle
style = { {height: "100px", width: "100px" }}
/>
Thanks for all the effort :)
from react-bootstrap-toggle.
Related Issues (20)
- There's no Toggle component HOT 2
- deprecations in react 15.5.0 HOT 5
- Warning: Accessing PropTypes via the main React package is deprecated HOT 1
- Disabled is not working HOT 2
- Enzyme hangs when trying to mount a component with "ToggleButton" in it HOT 2
- Setting height or width alone doesn't do anything HOT 1
- onClick callback HOT 4
- Include more example in a documentation page HOT 7
- Add TypeScript type definitions HOT 3
- Allow to set width 100% HOT 5
- react v16 HOT 3
- Remove dev files when publish HOT 10
- broken npm package HOT 3
- `className` prop being ignored HOT 1
- Bootstrap 4 support HOT 7
- Jest infinite loop HOT 4
- Publish 2.3.2 to npm HOT 5
- Does not support FontAwesomeIcons in labels HOT 1
- Looking for maintainers
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-bootstrap-toggle.