@@ -108,6 +108,13 @@ export default () => {
108
108
```
109
109
110
110
111
+ ** NOTE :**
112
+
113
+ api Object will not be changed after re-rendering multiple times.
114
+ Its value always refers to same reference.
115
+
116
+
117
+
111
118
## Options
112
119
113
120
### tabs
@@ -226,8 +233,10 @@ export default () => {
226
233
```
227
234
or
228
235
``` js
229
- api .setOption (' direction' ,' ltr' );
230
- api .refresh ();
236
+ if ( api .getOption (' direction' ) !== ' ltr' ) {
237
+ api .setOption (' direction' ,' ltr' );
238
+ api .refresh ();
239
+ }
231
240
```
232
241
233
242
@@ -345,10 +354,19 @@ api.refresh();
345
354
```
346
355
or
347
356
``` js
348
- api .setOption (' accessibility' ,false ).refresh ();
357
+ if ( api .getOption (' accessibility' ) == true ){
358
+ api .setOption (' accessibility' ,false ).refresh ();
359
+ }
349
360
```
350
361
351
362
363
+ ** NOTE :**
364
+
365
+ This option assigns id attribute on panel element and text element inside the tab.
366
+ for having elements without id attribute, set this option to false.
367
+
368
+
369
+
352
370
### onLoad
353
371
354
372
<table >
@@ -609,17 +627,19 @@ Parameters:
609
627
** Example**
610
628
611
629
``` js
612
- api .open ({
630
+ if ( api .isOpen (' 2' ) == false ){
631
+ api .open ({
613
632
id: ' 2' ,
614
633
title: ' contact' ,
615
634
tooltip: ' contact' ,
616
635
disable: false ,
617
636
closable: true ,
618
637
iconClass: ' ' ,
619
638
panelComponent: < ContactPanel>< / ContactPanel>
620
- }).then (()=> {
621
- // do sth here
622
- });
639
+ }).then (()=> {
640
+ // do sth here
641
+ });
642
+ }
623
643
```
624
644
625
645
@@ -649,9 +669,11 @@ Parameters:
649
669
** Example**
650
670
651
671
``` js
652
- api .select (' tab ID' ).then (()=> {
653
- // do sth here
654
- });
672
+ if ( api .isSelected (' your tab id' ) == false ){
673
+ api .select (' your tab id' ).then (()=> {
674
+ // do sth here
675
+ });
676
+ }
655
677
```
656
678
657
679
@@ -666,9 +688,11 @@ Parameters:
666
688
** Example**
667
689
668
690
``` js
669
- api .close (' tab ID' ).then (()=> {
670
- // do sth here
671
- });
691
+ if ( api .isOpen (' 2' ) == true ){
692
+ api .close (' 2' ).then (()=> {
693
+ // do sth here
694
+ });
695
+ }
672
696
```
673
697
674
698
@@ -807,7 +831,7 @@ Return value : api
807
831
Parameters:
808
832
809
833
- ` event Name : String (can be either of of onSelect|onClose|onOpen|onInit|onChange|onDestroy) `
810
- - ` function name `
834
+ - ` handler : function (A handler function previously attached for the event) `
811
835
812
836
** Example**
813
837
0 commit comments