Hello,
I have made some changes from the sample link which you have sent me,
First panel: I didn't change anything.
Second panel: Added select event to the links.
Third panel: Initial display is removed because I don't want to show any content initially. Displays content only when any link is clicked from the second panel.
After these changes, the second panel becomes responsive again and does not display with its given size.
My requirement is that only the third panel has to be responsive. First and Second panel has to have a fixed size. Please help.
I have made changes only in these two files. Please have a look at the code below
app.component.html
<div id="target" class="control-section outlook-style">
<ejs-splitter id="splitter1" #splitter1 height="493px" width="100%" (resizeStop)="onSplitterResize()">
<e-panes>
<e-pane [collapsible]="true" [collapsed]="true">
<ng-template #content>
<div class="content">
<ejs-treeview id="template" [fields]="field">
<!-- Template to render tree node -->
<ng-template #nodeTemplate="" let-data="">
<div>
<div class="treeviewdiv">
<div style="float:left">
<span class="treeName">{{data.name}}</span>
</div>
<div style="margin-right: 5px; float:right">
<span
class="treeCount e-badge e-badge-primary"
*ngIf="data.count"
>{{ data.count }}</span>
</div>
</div>
</div>
</ng-template>
</ejs-treeview>
</div>
</ng-template>
</e-pane>
<e-pane size="33%">
<ng-template #content>
<div class="content">
<ejs-listview [dataSource]="dataSource" cssClass="e-list-template" (select)='onSelect($event)'>
<ng-template #template let-dataSource="">
<div class="settings e-list-wrapper e-list-multi-line e-list-avatar">
<span class="e-list-item-header">{{dataSource.Name}}</span>
<span class="e-list-content">
<div>
<div class="status">
{{dataSource.content}}
</div>
<div id="list-message">
{{dataSource.content2}}
</div>
</div>
</span>
</div>
</ng-template>
</ejs-listview>
<div id="groupedList" tabindex="1"></div>
</div>
</ng-template>
</e-pane>
<e-pane>
<ng-template #content>
<div *ngIf="link === 'firstLink'" class="content">
first link content
</div>
<div *ngIf="link === 'secondLink'" class="content">
second link content
</div>
<div *ngIf="link === 'thirdLink'" class="content">
third link content
</div>
<div *ngIf="link === 'fourthLink'" class="content">
fourth link content
</div>
</ng-template>
</e-pane>
</e-panes>
</ejs-splitter>
</div>
<!-- Template to render tree node -->
<script id="treeTemplate" type="text/x-template">
<div>
<div class="treeviewdiv">
<div style="float:left">
<span class="treeName">${name}</span>
</div>
${if(count)}
<div style="margin-right: 5px; float:right">
<span class="treeCount e-badge e-badge-primary">${count}</span>
</div>
${/if}
</div>
</div>
</script>
app.component.ts
import { Component, ViewEncapsulation, ViewChild } from '@angular/core';
import { RichTextEditorComponent } from '@syncfusion/ej2-angular-richtexteditor';
import { FieldsSettingsModel } from '@syncfusion/ej2-navigations';
/**
* Splitter outlook layout style
*/
@Component({
selector: 'app-root',
templateUrl: 'app.component.html',
styleUrls: ['app.component.css'],
encapsulation: ViewEncapsulation.None
})
export class AppComponent {
@ViewChild('blogRTE') public rteObj: RichTextEditorComponent;
link:string = '';
public localData: { [key: string]: Object }[] = [
{ id: 1, name: 'Favorites', hasChild: true },
{ id: 2, pid: 1, name: 'Sales Reports', count: '4' },
{ id: 3, pid: 1, name: 'Sent Items' },
{ id: 4, pid: 1, name: 'Marketing Reports ', count: '6' },
{ id: 5, name: 'Andrew Fuller', hasChild: true, expanded: true },
{ id: 6, pid: 5, name: 'Inbox', selected: true, count: '20' },
{ id: 7, pid: 5, name: 'Drafts', count: '5' },
{ id: 15, pid: 5, name: 'Archive' },
{ id: 8, pid: 5, name: 'Deleted Items' },
{ id: 9, pid: 5, name: 'Sent Items' },
{ id: 10, pid: 5, name: 'Sales Reports', count: '4' },
{ id: 11, pid: 5, name: 'Marketing Reports', count: '6' },
{ id: 12, pid: 5, name: 'Outbox' },
{ id: 13, pid: 5, name: 'Junk Email' },
{ id: 14, pid: 5, name: 'RSS Feed' },
{ id: 15, pid: 5, name: 'Trash' }
];
public field: FieldsSettingsModel = { dataSource: this.localData, id: 'id', parentID: 'pid', text: 'name', hasChildren: 'hasChild' };
public dataSource: { [key: string]: Object }[] = [
{ Name: 'First link', content: 'Apology marketing email', content2: 'Hello Ananya Singleton', id: 'firstLink', order: 0 },
{ Name: 'Second link', content: 'Annual conference', content2: 'Hi jeani Moresa', id: 'secondLink', order: 0 },
{ Name: 'Third link', content: 'Reference request- Camden hester', content2: 'Hello Kerry Best', id: 'thirdLink', order: 0 },
{ Name: 'Fourth link', content: 'Application for job Title', content2: 'Hello Illa Russo', id: 'fourthLink', order: 0 }
];
public onSplitterResize(): void {
this.rteObj.refresh();
}
onSelect(event) {
console.log(event);
this.reset();
this.link = event.data.id;
}
reset() {
this.link = '';
}
}
Thank you
Nikitha R