Skip to content

Commit 473fc19

Browse files
update readme.md
1 parent 7a4b2f7 commit 473fc19

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

README.md

+18-16
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export default () => {
165165
**Example**
166166

167167
```js
168-
const [ TabList , PanelList , instance ] = useDynTabs({
168+
const [ TabList , PanelList , ready ] = useDynTabs({
169169
tabs : [
170170
{
171171
id: '1',
@@ -209,7 +209,7 @@ export default () => {
209209
**Example**
210210

211211
```js
212-
const [ TabList , PanelList , instance ] = useDynTabs({
212+
const [ TabList , PanelList , ready ] = useDynTabs({
213213
tabs : [
214214
{
215215
id: '1',
@@ -253,7 +253,7 @@ export default () => {
253253
**Example**
254254

255255
```js
256-
const [ TabList , PanelList , instance ] = useDynTabs({ direction : 'rtl' });
256+
const [ TabList , PanelList , ready ] = useDynTabs({ direction : 'rtl' });
257257
```
258258
or
259259
```js
@@ -284,7 +284,7 @@ if( instance.getOption('direction') !== 'ltr') {
284284
**Example**
285285

286286
```js
287-
const [ TabList , PanelList , instance ] = useDynTabs({
287+
const [ TabList , PanelList , ready ] = useDynTabs({
288288
tabComponent : props => {
289289
const { id , isSelected , instance } = props;
290290
return (
@@ -340,7 +340,7 @@ Default value for panelComponent option.
340340
**Example**
341341

342342
```js
343-
const [ TabList , PanelList , instance ] = useDynTabs({
343+
const [ TabList , PanelList , ready ] = useDynTabs({
344344
defaultPanelComponent : props => {
345345
const { id , isSelected , instance } = props;
346346
return <div></div>
@@ -376,7 +376,7 @@ instance.refresh();
376376
**Example**
377377

378378
```js
379-
const [ TabList , PanelList , instance ] = useDynTabs({ accessibility : false });
379+
const [ TabList , PanelList , ready ] = useDynTabs({ accessibility : false });
380380
```
381381
or
382382
```js
@@ -413,7 +413,7 @@ This option assigns id attribute on panel element and button element inside the
413413
**Example**
414414

415415
```js
416-
const [ TabList , PanelList , instance ] = useDynTabs({ onLoad : function() {
416+
const [ TabList , PanelList , ready ] = useDynTabs({ onLoad : function() {
417417
// you can use 'this' here which refers to the instance
418418
} });
419419
```
@@ -439,11 +439,13 @@ This option assigns id attribute on panel element and button element inside the
439439
**Example**
440440

441441
```js
442-
const [ TabList , PanelList , instance ] = useDynTabs({ onInit : function() {
442+
const [ TabList , PanelList , ready ] = useDynTabs({ onInit : function() {
443443
// you can use 'this' here which refers to the instance
444444
} });
445445
// or
446446
instance.setOption('onInit', () => { } ).refresh();
447+
// or
448+
instance.on('onInit',()=>{ });
447449
```
448450

449451

@@ -467,7 +469,7 @@ This option assigns id attribute on panel element and button element inside the
467469
**Example**
468470

469471
```js
470-
const [ TabList , PanelList , instance ] = useDynTabs({ onChange : function({ currentData , perviousData }) {
472+
const [ TabList , PanelList , ready ] = useDynTabs({ onChange : function({ currentData , perviousData }) {
471473
// you can use 'this' here which refers to the instance
472474
} });
473475
// or
@@ -498,7 +500,7 @@ This option assigns id attribute on panel element and button element inside the
498500
**Example**
499501

500502
```js
501-
const [ TabList , PanelList , instance ] = useDynTabs({ beforeSelect : function(e, id) {
503+
const [ TabList , PanelList , ready ] = useDynTabs({ beforeSelect : function(e, id) {
502504
// you can use 'this' here which refers to the instance
503505
return true;
504506
} });
@@ -527,7 +529,7 @@ This option assigns id attribute on panel element and button element inside the
527529
**Example**
528530

529531
```js
530-
const [ TabList , PanelList , instance ] = useDynTabs({
532+
const [ TabList , PanelList , ready ] = useDynTabs({
531533
onSelect : function({currentSelectedTabId , perviousSelectedTabId}) {
532534
// you can use 'this' here which refers to the instance
533535
}
@@ -556,7 +558,7 @@ This option assigns id attribute on panel element and button element inside the
556558
**Example**
557559

558560
```js
559-
const [ TabList , PanelList , instance ] = useDynTabs({ onOpen : function(openedTabIDs) {
561+
const [ TabList , PanelList , ready ] = useDynTabs({ onOpen : function(openedTabIDs) {
560562
// you can use 'this' here which refers to the instance
561563
}});
562564
// or
@@ -588,7 +590,7 @@ This option assigns id attribute on panel element and button element inside the
588590
**Example**
589591

590592
```js
591-
const [ TabList , PanelList , instance ] = useDynTabs({ beforeClose : function(e, id) {
593+
const [ TabList , PanelList , ready ] = useDynTabs({ beforeClose : function(e, id) {
592594
// you can use 'this' here which refers to the instance
593595
return true;
594596
} });
@@ -617,7 +619,7 @@ This option assigns id attribute on panel element and button element inside the
617619
**Example**
618620

619621
```js
620-
const [ TabList , PanelList , instance ] = useDynTabs({ onClose : function(closedTabIDs) {
622+
const [ TabList , PanelList , ready ] = useDynTabs({ onClose : function(closedTabIDs) {
621623
// you can use 'this' here which refers to the instance
622624
}});
623625
// or
@@ -645,7 +647,7 @@ This option assigns id attribute on panel element and button element inside the
645647
**Example**
646648

647649
```js
648-
const [ TabList , PanelList , instance ] = useDynTabs({ onDestroy : function() {
650+
const [ TabList , PanelList , ready ] = useDynTabs({ onDestroy : function() {
649651
// you can use 'this' here which refers to the instance
650652
}});
651653
// or
@@ -994,7 +996,7 @@ const tabData = {
994996
closable: false,
995997
panelComponent: porps => <p> contact content </p>
996998
};
997-
const [ TabList , PanelList , instance ] = useDynTabs( { tabs : [tabData] } );
999+
const [ TabList , PanelList , ready ] = useDynTabs( { tabs : [tabData] } );
9981000
// or
9991001
if(instance.isOpen(tabData.id) == false ){
10001002
instance.open(tabData).then(()=>{});

0 commit comments

Comments
 (0)