Skip to content

Commit 9c92bfa

Browse files
update readme
1 parent 28c0cad commit 9c92bfa

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

README.md

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ React Dynamic Tabs with full API
1515
- **PanelList can be rendered outside the TabList container**
1616
- **ARIA accessible**
1717
- **Supporting custom Tab component**
18+
- **Batching updates**
1819

1920
## Table of Contents
2021

@@ -52,7 +53,7 @@ React Dynamic Tabs with full API
5253
- [on](#on)
5354
- [one](#one)
5455
- [off](#off)
55-
- [getCopyData](#getCopyData)
56+
- [getData](#getData)
5657
- [getPreviousData](#getPreviousData)
5758
- [tabData](#tabData)
5859
- [Lazy Loading](#lazy-loading)
@@ -516,7 +517,7 @@ instance
516517
<tr>
517518
<td>function</td>
518519
<td>false</td>
519-
<td>fires after selecting tabs</td>
520+
<td>fires after selecting tabs. this event is not fired initially</td>
520521
</tr>
521522
</tbody>
522523
</table>
@@ -545,7 +546,7 @@ instance.setOption('onSelect', ({currentSelectedTabId, previousSelectedTabId}) =
545546
<tr>
546547
<td>function</td>
547548
<td>false</td>
548-
<td>fires after opening tabs</td>
549+
<td>fires after opening tabs. this event is not fired initially</td>
549550
</tr>
550551
</tbody>
551552
</table>
@@ -611,7 +612,7 @@ instance
611612
<tr>
612613
<td>function</td>
613614
<td>false</td>
614-
<td>fires after closing tabs</td>
615+
<td>fires after closing tabs. this event is not fired initially</td>
615616
</tr>
616617
</tbody>
617618
</table>
@@ -719,7 +720,11 @@ const result = instance.isSelected('tab ID');
719720

720721
### select
721722

722-
Triggers 'onInit', 'onChange' and 'onSelect' event. Selecting an already selected tab only triggers 'onInit' event.
723+
Makes current and previous selected tab to be re-rendered
724+
725+
Triggers 'onInit', 'onChange' and 'onSelect' event.
726+
727+
Selecting an already selected tab only triggers 'onInit' event.
723728

724729
Return value : Promise
725730

@@ -766,6 +771,8 @@ if (instance.isOpen('2') == true) {
766771

767772
### refresh
768773

774+
Makes all tabs to be re-rendered.
775+
769776
triggers onInit event.
770777

771778
Return value : Promise
@@ -905,16 +912,22 @@ const onSelectHandler = function (params) {
905912
instance.on('onSelect', onSelectHandler);
906913
```
907914

908-
### getCopyData
915+
### getData
916+
917+
get a copy of data
909918

910919
Return value : Object
911920

912921
**Example**
913922

914923
```js
915-
const {selectedTabID, openTabIDs} = instance.getCopyData();
924+
const {selectedTabID, openTabIDs} = instance.getData();
916925
```
917926

927+
**NOTE :**
928+
929+
- getCopyData function is an older version of getData function and it is enabled by default so that existing users do not have to change their code. You are free to use both conventions.
930+
918931
### getPreviousData
919932

920933
get a copy of data in previous render
@@ -927,6 +940,10 @@ Return value : Object
927940
const {selectedTabID, openTabIDs} = instance.getPreviousData();
928941
```
929942

943+
**NOTE :**
944+
945+
- getCopyPerviousData function is an older version of getPreviousData function and it is enabled by default so that existing users do not have to change their code. You are free to use both conventions.
946+
930947
## tabData
931948

932949
<table>
@@ -1040,8 +1057,6 @@ const open_tab_3 = function () {
10401057

10411058
- First parameter of onChange function is an object and has perviousData property which is deprecated. you should use previousData property instead of perviousData property.
10421059

1043-
- getCopyPerviousData method is deprecated. use getPreviousData method instead of it.
1044-
10451060
## Test
10461061

10471062
```js

0 commit comments

Comments
 (0)