Closed SoftCircuits closed 2 months ago
@palcarazm Is there anyone that could look at this issue? It seems like I'm just doing basic functionality here. I would have thought this would be rock solid.
Hi you can use rerender method from JavaScript to set correct height to toggle.
In fact this occurs when toggle is render in a not visible section.
@palcarazm
Hi you can use rerender method from JavaScript to set correct height to toggle.
In fact this occurs when toggle is render in a not visible section.
Thanks. In fact, this is on a modal popup. So it is not visible when the page is displayed.
I am not familiar with rerender
, and I seem to be having trouble finding it. Do you happen to have a link?
@palcarazm
Hi you can use rerender method from JavaScript to set correct height to toggle.
In fact this occurs when toggle is render in a not visible section.
Thanks. In fact, this is on a modal popup. So it is not visible when the page is displayed.
I am not familiar with
rerender
, and I seem to be having trouble finding it. Do you happen to have a link?
Is a bootstrap-toggle method https://github.com/palcarazm/bootstrap5-toggle#methods
@palcarazm Yes, I got that working. Thanks.
I have the following markup.
Here's the generated HTML.
It functions correctly, but the control height is not tall enough.
I have a similar button elsewhere in my project. I copied that code. So it should work. It seemed like I may have had the same issue with the other code but can't remember how I resolved it.
If you look at the div created by the control, you can see
style="width: 100%; min-height: 0px;"
On the other version that works, it hasmin-height
set to 38px. But I don't understand why.Why doesn't it set the correct height? And what do I need to do about it?
Note: I was using bootstrap5-toggle v5.0.6, but upgraded to v5.1.1 and there was no difference.