Flexbox wrap issue

I have a flexbox that wraps the buttons correctly without a container in it…
image

but does this when I put a container in it…

Is this expected? Work around?

Further investigation it is the FlexBox.show() method that throws it out. Prior to that it displays fine.

Yeah, the .show() and .hide() NSB methods can be tricky around flexboxes, as I think they set the CSS display property to “block” (show) and “none” (hide) in the backend.

You might want to try the JS vanilla way of hiding and showing:

# hide
Element.style.display = “none”;

# show flexbox
Element.style.display = “flex”;

# show non-flexbox
Element.style.display = “block”;