@@ -419,11 +419,15 @@ const [TabList, PanelList, ready] = useDynTabs({isVertical: true});
419
419
``` js
420
420
const [TabList , PanelList , ready ] = useDynTabs ({
421
421
onLoad : function () {
422
- // you can use 'this' here which refers to the instance
422
+ console . log ( ' [onLoad] ' );
423
423
},
424
424
});
425
425
```
426
426
427
+ ** NOTE :**
428
+
429
+ You can use 'this' keyword inside all callback options which refers to the instance object.
430
+
427
431
### onInit
428
432
429
433
<table >
@@ -446,7 +450,7 @@ const [TabList, PanelList, ready] = useDynTabs({
446
450
``` js
447
451
const [TabList , PanelList , ready ] = useDynTabs ({
448
452
onInit : function () {
449
- // you can use 'this' here which refers to the instance
453
+ console . log ( ' [onInit] ' );
450
454
},
451
455
});
452
456
```
@@ -477,7 +481,7 @@ Do not use setState inside the onInit callback because it leads to an infinite l
477
481
``` js
478
482
const [TabList , PanelList , ready ] = useDynTabs ({
479
483
onChange : function ({currentData, previousData, closedTabIDs, openedTabIDs}) {
480
- // you can use 'this' here which refers to the instance
484
+ console . log ( ' [onChange] ' );
481
485
},
482
486
});
483
487
```
@@ -507,7 +511,7 @@ const [TabList, PanelList, ready] = useDynTabs({
507
511
``` js
508
512
const [TabList , PanelList , ready ] = useDynTabs ({
509
513
beforeSelect : function (e , id ) {
510
- // you can use 'this' here which refers to the instance
514
+ console . log ( ' [beforeSelect] ' );
511
515
return true ;
512
516
},
513
517
});
@@ -535,7 +539,7 @@ const [TabList, PanelList, ready] = useDynTabs({
535
539
``` js
536
540
const [TabList , PanelList , ready ] = useDynTabs ({
537
541
onSelect : function ({currentSelectedTabId, previousSelectedTabId}) {
538
- // you can use 'this' here which refers to the instance
542
+ console . log ( ' [onSelect] ' );
539
543
},
540
544
});
541
545
```
@@ -562,7 +566,7 @@ const [TabList, PanelList, ready] = useDynTabs({
562
566
``` js
563
567
const [TabList , PanelList , ready ] = useDynTabs ({
564
568
onOpen : function (openedTabIDs ) {
565
- // you can use 'this' here which refers to the instance
569
+ console . log ( ' [onOpen] ' );
566
570
},
567
571
});
568
572
```
@@ -592,7 +596,7 @@ const [TabList, PanelList, ready] = useDynTabs({
592
596
``` js
593
597
const [TabList , PanelList , ready ] = useDynTabs ({
594
598
beforeClose : function (e , id ) {
595
- // you can use 'this' here which refers to the instance
599
+ console . log ( ' [beforeClose] ' );
596
600
return true ;
597
601
},
598
602
});
@@ -620,7 +624,7 @@ const [TabList, PanelList, ready] = useDynTabs({
620
624
``` js
621
625
const [TabList , PanelList , ready ] = useDynTabs ({
622
626
onClose : function (closedTabIDs ) {
623
- // you can use 'this' here which refers to the instance
627
+ console . log ( ' [onClose] ' );
624
628
},
625
629
});
626
630
```
@@ -647,7 +651,7 @@ const [TabList, PanelList, ready] = useDynTabs({
647
651
``` js
648
652
const [TabList , PanelList , ready ] = useDynTabs ({
649
653
onDestroy : function () {
650
- // you can use 'this' here which refers to the instance
654
+ console . log ( ' [onDestroy] ' );
651
655
},
652
656
});
653
657
```
0 commit comments