Coder Social home page Coder Social logo

Comments (5)

arnthor3 avatar arnthor3 commented on May 5, 2024 1

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.

arnthor3 avatar arnthor3 commented on May 5, 2024

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.

ido1wald avatar ido1wald commented on May 5, 2024

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.

arnthor3 avatar arnthor3 commented on May 5, 2024

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.

ido1wald avatar ido1wald commented on May 5, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.