Angular Splitter - items
The items array can contain:
- Objects with fields described in this section.
- Objects with any other fields. In this case, specify the itemTemplate.
As an alternative to items, you can use the dataSource property. It accepts the DataSource object, whose underlying stores supply an API that allows you to update individual items without reassigning the entire item collection.
collapsible
To collapse a pane, you can also double-click the separator bar.
maxSize
- <dx-splitter ... >
- <dxi-item ...
- maxSize="500px"
- >
- </dxi-item>
- </dx-splitter>
minSize
- <dx-splitter ... >
- <dxi-item ...
- minSize="30%"
- >
- </dxi-item>
- </dx-splitter>
size
Specifies the initial size of an item (pane) in pixels or as a percentage. The size changes after any layout alteration.
- <dx-splitter ... >
- <dxi-item ...
- size="50%"
- >
- </dxi-item>
- </dx-splitter>
If you do not specify pane sizes, the UI component splits up the panes automatically with even distribution.
splitter
Specifies a splitter inside an item (pane).
Use this property to make the item a nested Splitter UI component.
- <dx-splitter id="splitter" orientation="vertical">
- <dxi-item text="Top Panel"></dxi-item>
- <dxi-item>
- <dx-splitter>
- <dxi-item text="Nested Left Panel"></dxi-item>
- <dxi-item text="Nested Central Panel"></dxi-item>
- <dxi-item text="Nested Right Panel"></dxi-item>
- </dx-splitter>
- </dxi-item>
- </dx-splitter>
template
The following types of the specified value are available.
- Assign a string containing the name of the required template.
- Assign a DOM Node of the template's container.
The following example adds a custom item to the component. Note that Angular uses custom templates instead of the template property.
- <dx-splitter ... >
- <dxi-item ... >
- <div *dxTemplate>
- <div>Custom Item</div>
- </div>
- </dxi-item>
- </dx-splitter>
- import { Component } from '@angular/core';
- @Component({
- selector: 'app-root',
- templateUrl: './app.component.html',
- styleUrls: ['./app.component.css']
- })
- export class AppComponent {
- // ...
- }
- import { BrowserModule } from '@angular/platform-browser';
- import { NgModule } from '@angular/core';
- import { AppComponent } from './app.component';
- import { DxSplitterModule } from 'devextreme-angular';
- @NgModule({
- declarations: [
- AppComponent
- ],
- imports: [
- BrowserModule,
- DxSplitterModule
- ],
- providers: [ ],
- bootstrap: [AppComponent]
- })
- export class AppModule { }
See Also
visible
When you set this property to true
at runtime, displayed pane size becomes 0. Update other pane sizes to display the pane.
If you have technical questions, please create a support ticket in the DevExpress Support Center.