| props | type | default | |
|---|---|---|---|
| defaultIndex | int |
null | set the initial active key |
| activeIndex | int |
null | control current activeIndex. You need to pass new activeIndex value if you want to show different tab. |
| defaultIndex | int |
null | set the initial active key |
| showModalButton | booleannumber |
4 |
|
| showArrowButton | autoboolean |
auto |
|
| ExtraButton | React Node |
null | customize extra button content, example: `+` button |
| onTabChange | () => tabIndex |
null |
return tabIndex is clicked You can use this api with activeIndex. When user click tab, update activeIndex.
|
| onTabSequenceChange | () => {oldIndex, newIndex} |
null |
return changed oldIndex and newIndex value With this api, you can do switch tab very easily. Note:This api is only called by <DragTab/>
|
| onTabEdit | () => {type: [delete], index} |
null | When user click close button , this api will return the clicked close button index. |
| customStyle |
|
Bootstrap theme | customized tab style component |
| props | type | default | |
|---|---|---|---|
| closable | boolean |
false | whether to show close button |
| props | type | default | |
|---|---|---|---|
| loadContent * |
(cb) => cb(error, data) or (cb) => Promise
|
null | when loadContent finish, call the callback or you can return promise |
| render * |
(data) => Component
|
null | when finish loading data, render this component |
| renderLoading * |
() => Component
|
null | when it is loading data, render this component |
| cache |
boolean
|
true | should cache the data |