documentation(EJ2-000): source update from ej2-navigations-angular-docs

This commit is contained in:
essentialjs2 2021-07-15 10:55:44 +00:00
Родитель 7d32be1961
Коммит 8efb662eed
2 изменённых файлов: 15 добавлений и 9 удалений

Просмотреть файл

@ -64,18 +64,24 @@ export class AppComponent {
@ViewChild('element') acrdnInstance: AccordionComponent;
public clickEle: HTMLElement;
public clicked(e: AccordionClickArgs) {
this.clickEle = e.originalEvent.target;
this.clickEle = (e.originalEvent.target as Element).closest(
'.e-acrdn-header'
);
}
public beforeExpand (e: ExpandEventArgs):void {
let expandCount: number = this.acrdnInstance.element.querySelectorAll('.e-selected').length;
let ele: HTMLElement= this.acrdnInstance.element.querySelectorAll('.e-selected')[0];
public beforeExpand(e: ExpandEventArgs): void {
let expandCount: number = this.acrdnInstance.element.querySelectorAll(
'.e-selected'
).length;
let ele: Element = this.acrdnInstance.element.querySelectorAll(
'.e-selected'
)[0];
if (ele) {
ele = ele.firstChild
ele = ele.firstChild as Element;
}
if (expandCount === 1 && ele === this.clickEle) {
e.cancel = true;
}
}
}
}
```

Просмотреть файл

@ -32,7 +32,7 @@ import { EmitType } from '@syncfusion/ej2-base';
@Component({
selector: 'app-container',
template: `
<ejs-tab id="element" locale="fr-BE" showCloseButton=true>
<ejs-tab id="element" locale="fr-BE" [showCloseButton]='true'>
<e-tabitems>
<e-tabitem [header]='headerText[0]' [content]="content0"></e-tabitem>
<e-tabitem [header]='headerText[1]' [content]="content1"></e-tabitem>