Skip to content

Commit

Permalink
feat: Tabs items support destroyInactiveTabPane (ant-design#45359)
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ authored Oct 16, 2023
1 parent 9a04519 commit 98a8d30
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion components/tabs/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ More option at [rc-tabs tabs](https://github.com/react-component/tabs#tabs)
### TabItemType

| Property | Description | Type | Default |
| --- | --- | --- | --- |
| --- | --- | --- | --- | --- |
| closeIcon | Customize close icon in TabPane's head. Only works while `type="editable-card"`. 5.7.0: close button will be hidden when setting to `null` or `false` | boolean \| ReactNode | - |
| destroyInactiveTabPane | Whether destroy inactive TabPane when change tab | boolean | false | 5.11.0 |
| disabled | Set TabPane disabled | boolean | false |
| forceRender | Forced render of content in tabs, not lazy render after clicking on tabs | boolean | false |
| key | TabPane's key | string | - |
Expand Down
3 changes: 2 additions & 1 deletion components/tabs/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ Ant Design 依次提供了三级选项卡,分别用于不同的场景。
### TabItemType

| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| --- | --- | --- | --- | --- |
| closeIcon | 自定义关闭图标,在 `type="editable-card"` 时有效。5.7.0:设置为 `null``false` 时隐藏关闭按钮 | boolean \| ReactNode | - |
| destroyInactiveTabPane | 被隐藏时是否销毁 DOM 结构 | boolean | false | 5.11.0 |
| disabled | 禁用某一项 | boolean | false |
| forceRender | 被隐藏时是否渲染 DOM 结构 | boolean | false |
| key | 对应 activeKey | string | - |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
"rc-steps": "~6.0.1",
"rc-switch": "~4.1.0",
"rc-table": "~7.35.1",
"rc-tabs": "~12.12.1",
"rc-tabs": "~12.13.0",
"rc-textarea": "~1.5.1",
"rc-tooltip": "~6.1.1",
"rc-tree": "~5.7.12",
Expand Down

0 comments on commit 98a8d30

Please sign in to comment.