Skip to content

Commit

Permalink
fix: #1676
Browse files Browse the repository at this point in the history
  • Loading branch information
Wugaoliang committed Apr 19, 2021
1 parent 41f1883 commit f9a3eb0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/tabs/Tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ const Tabs = ({
onAdd(children.length + 1)
childRef.current = children.length
}
}, [children, editable])
}, [children, editable, onAdd])

const deleteTab = useCallback(
(e, tabId, index, item) => {
Expand All @@ -165,7 +165,7 @@ const Tabs = ({
}
}
},
[editable, activeId]
[editable, activeId, onDelete]
)

const renderTabContent = useCallback(
Expand Down Expand Up @@ -457,8 +457,8 @@ const Tabs = ({
)}
</div>
{checkEditable && onAdd && !canScroll && (
<div className={`${prefixCls}__add`}>
<Icon onClick={addTab} name="plus" />
<div className={`${prefixCls}__add`} onClick={addTab}>
<Icon name="plus" />
</div>
)}
</div>
Expand Down

0 comments on commit f9a3eb0

Please sign in to comment.