caplin / FlexLayout

Docking Layout Manager for React
MIT License
919 stars 173 forks source link

Add docs for active tabset attribute #401

Closed acontreras89 closed 12 months ago

acontreras89 commented 1 year ago

Document the active attribute for tabsets.

nealus commented 12 months ago

active is not actually an attribute of the tabset, like the others, there is a isActive() method but it cannot be set in json as an attribute

acontreras89 commented 12 months ago

@nealus yes it is (can be seen here and here), and the fact that it is not documented causes some confusion when starting to use the library (see my comment in issue #51).

When instantiating a layout, you either pass the active flag to some of the tabsets in your model or you will not be able to use addTabToActiveTabSet until the user actually focuses one of them, which is quite annoying and a completely silent no-op.

nealus commented 12 months ago

yes ok, you can specify it in the initial json layout, but you set the active tabset on the model (you cannot update the active attribute of a tabset, it is not actually a tabset attribute like others), can you add a note that effect, the I will merge your change.

acontreras89 commented 12 months ago

@nealus note added 👍 hope this is ok