File tree 3 files changed +15
-2
lines changed
3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -372,6 +372,10 @@ export namespace AccordionPanel {
372
372
* The default implementation of `IRenderer`.
373
373
*/
374
374
export class Renderer extends SplitPanel . Renderer implements IRenderer {
375
+ constructor ( ) {
376
+ super ( ) ;
377
+ this . _uuid = ++ Renderer . _nInstance ;
378
+ }
375
379
/**
376
380
* A selector which matches any title node in the accordion.
377
381
*/
@@ -430,12 +434,14 @@ export namespace AccordionPanel {
430
434
createTitleKey ( data : Title < Widget > ) : string {
431
435
let key = this . _titleKeys . get ( data ) ;
432
436
if ( key === undefined ) {
433
- key = `title-key-${ this . _titleID ++ } ` ;
437
+ key = `title-key-${ this . _uuid } - ${ this . _titleID ++ } ` ;
434
438
this . _titleKeys . set ( data , key ) ;
435
439
}
436
440
return key ;
437
441
}
438
442
443
+ private static _nInstance = 0 ;
444
+ private readonly _uuid : number ;
439
445
private _titleID = 0 ;
440
446
private _titleKeys = new WeakMap < Title < Widget > , string > ( ) ;
441
447
}
Original file line number Diff line number Diff line change @@ -1519,6 +1519,9 @@ export namespace TabBar {
1519
1519
* Subclasses are free to reimplement rendering methods as needed.
1520
1520
*/
1521
1521
export class Renderer implements IRenderer < any > {
1522
+ constructor ( ) {
1523
+ this . _uuid = ++ Renderer . _nInstance ;
1524
+ }
1522
1525
/**
1523
1526
* A selector which matches the close icon node in a tab.
1524
1527
*/
@@ -1607,7 +1610,7 @@ export namespace TabBar {
1607
1610
createTabKey ( data : IRenderData < any > ) : string {
1608
1611
let key = this . _tabKeys . get ( data . title ) ;
1609
1612
if ( key === undefined ) {
1610
- key = `tab-key-${ this . _tabID ++ } ` ;
1613
+ key = `tab-key-${ this . _uuid } - ${ this . _tabID ++ } ` ;
1611
1614
this . _tabKeys . set ( data . title , key ) ;
1612
1615
}
1613
1616
return key ;
@@ -1680,6 +1683,8 @@ export namespace TabBar {
1680
1683
return extra ? `${ name } ${ extra } ` : name ;
1681
1684
}
1682
1685
1686
+ private static _nInstance = 0 ;
1687
+ private readonly _uuid : number ;
1683
1688
private _tabID = 0 ;
1684
1689
private _tabKeys = new WeakMap < Title < any > , string > ( ) ;
1685
1690
}
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ export namespace AccordionPanel {
73
73
export type IRenderer = AccordionLayout .IRenderer ;
74
74
export type Orientation = SplitLayout .Orientation ;
75
75
export class Renderer extends SplitPanel .Renderer implements IRenderer {
76
+ constructor ();
76
77
createCollapseIcon(data : Title <Widget >): HTMLElement ;
77
78
createSectionTitle(data : Title <Widget >): HTMLElement ;
78
79
createTitleKey(data : Title <Widget >): string ;
@@ -1133,6 +1134,7 @@ export namespace TabBar {
1133
1134
*/
1134
1135
| ' select-previous-tab' ;
1135
1136
export class Renderer implements IRenderer <any > {
1137
+ constructor ();
1136
1138
readonly closeIconSelector = " .lm-TabBar-tabCloseIcon" ;
1137
1139
createIconClass(data : IRenderData <any >): string ;
1138
1140
createTabARIA(data : IRenderData <any >): ElementARIAAttrs ;
You can’t perform that action at this time.
0 commit comments