new MultiView(parent, props)
MultiView component that extends the Tab component, allowing for multiple views within a tabbed interface. This class focuses on the specific properties of the MultiView component. Since it inherits from Accessor_A, all basic properties (e.g., height, width) are available but documented in the Accessor_A part.
| Name | Type | Description |
|---|---|---|
parent | HTMLElement | The parent HTML element to which the component will be attached. |
props | TComponents. | Properties to initialize the component. |
- Source
const multiview = new TComponents.Tab(document.body, {
position: 'absolute',
width: 200,
height: 200,
zIndex: 1000,
views: [
{
name: 'Multiview 1',
icon: '',
content: `view_${API.generateUUID()}`,
children: [],
},
{
name: 'Multiview 2',
icon: '',
content: `view_${API.generateUUID()}`,
children: [],
},
],
activeViewIndex: 0,
});
// Render the component.
await multiview.render();Extends
Methods
(protected) defaultProps() → {TComponents.TabProps}
Returns the default properties of the tab component.
- Overrides
- Source
Default properties.
- Type:
- TComponents.
TabProps
markup() → {string}
Generates the markup for the MultiView component.
- Overrides
- Source
The HTML markup string.
- Type:
- string
onRender() → {void}
Renders the MultiView component, setting up necessary event listeners and styles.
- Overrides
- Source
Throws an error if rendering fails.
- Type
- Error
- Type:
- void
(static) loadCssClassFromString(css) → {void}
Add css properties to the component
| Name | Type | Description |
|---|---|---|
css | string | The css string to be loaded into style tag |
- Source
- Type:
- void
TComponents.MultiView.loadCssClassFromString(`
.tc-multiview {
position: absolute;
height: 100%;
}`
);