ToggleButton, versions and documentation

Hi,

I’ve been struggling with ToggleButton for a few hours now but I think I have worked out that it must have only recently been added - avail in 5.0 but not 4.2

As far as I understand 5.0 is still in alpha so I am using 4.2 however the documentation seems to reflect 5.0 but there is no indication of this. Is it possible to have an indication on the documentation as to when a feature is avail or be able to select previous versions of the documentation? I assumed the docs would be reflecting the most recent stable release.

PG for ref: Babylon.js Playground
setting to 4.2 gives ToggleButton is not a constructor but 5.0 is fine, although textBlock is returning undef so how do I set the text?

We normally try to indicate the version from which a new feature has been added, it must be an oversight here. The toggle button is new in 5.0 indeed, a PR is always welcome!

Adding @kintz_09 who is the creator of the control regarding the textBlock property being undefined.

[…] It seems you need to add the text as a child control:

https://playground.babylonjs.com/#TB3YPJ#1

However, I don’t understand the purpose of the textBlock and image properties of ToggleButton which can only be read and not written (so they will always be undefined)…

@kintz_09 Could you confirm that we could remove those properties as they are useless at the moment or are you planing to upgrade it ?