@@ -25,6 +25,7 @@ import useTouchMove from '../hooks/useTouchMove';
2525import useRefs from '../hooks/useRefs' ;
2626import AddButton from './AddButton' ;
2727import useSyncState from '../hooks/useSyncState' ;
28+ import type { DropdownProps } from 'rc-dropdown/lib/Dropdown' ;
2829
2930export interface TabNavListProps {
3031 id : string ;
@@ -36,6 +37,7 @@ export interface TabNavListProps {
3637 extra ?: TabBarExtraContent ;
3738 editable ?: EditableConfig ;
3839 moreIcon ?: React . ReactNode ;
40+ moreTabsDropdownProps ?: Partial < DropdownProps > ;
3941 moreTransitionName ?: string ;
4042 mobile : boolean ;
4143 tabBarGutter ?: number ;
@@ -89,6 +91,7 @@ function TabNavList(props: TabNavListProps, ref: React.Ref<HTMLDivElement>) {
8991 children,
9092 onTabClick,
9193 onTabScroll,
94+ moreTabsDropdownProps,
9295 } = props ;
9396 const tabsWrapperRef = useRef < HTMLDivElement > ( ) ;
9497 const tabListRef = useRef < HTMLDivElement > ( ) ;
@@ -162,7 +165,7 @@ function TabNavList(props: TabNavListProps, ref: React.Ref<HTMLDivElement>) {
162165
163166 useTouchMove ( tabsWrapperRef , ( offsetX , offsetY ) => {
164167 function doMove ( setState : React . Dispatch < React . SetStateAction < number > > , offset : number ) {
165- setState ( value => {
168+ setState ( ( value ) => {
166169 const newValue = alignInRange ( value + offset ) ;
167170
168171 return newValue ;
@@ -269,7 +272,7 @@ function TabNavList(props: TabNavListProps, ref: React.Ref<HTMLDivElement>) {
269272 { ...props , tabs } ,
270273 ) ;
271274
272- const tabNodes : React . ReactElement [ ] = tabs . map ( tab => {
275+ const tabNodes : React . ReactElement [ ] = tabs . map ( ( tab ) => {
273276 const { key } = tab ;
274277 return (
275278 < TabNode
@@ -286,7 +289,7 @@ function TabNavList(props: TabNavListProps, ref: React.Ref<HTMLDivElement>) {
286289 renderWrapper = { children }
287290 removeAriaLabel = { locale ?. removeAriaLabel }
288291 ref = { getBtnRef ( key ) }
289- onClick = { e => {
292+ onClick = { ( e ) => {
290293 onTabClick ( key , e ) ;
291294 } }
292295 onRemove = { ( ) => {
@@ -398,7 +401,7 @@ function TabNavList(props: TabNavListProps, ref: React.Ref<HTMLDivElement>) {
398401 // Should recalculate when rtl changed
399402 useEffect ( ( ) => {
400403 onListHolderResize ( ) ;
401- } , [ rtl , tabBarGutter , activeKey , tabs . map ( tab => tab . key ) . join ( '_' ) ] ) ;
404+ } , [ rtl , tabBarGutter , activeKey , tabs . map ( ( tab ) => tab . key ) . join ( '_' ) ] ) ;
402405
403406 // ========================= Render ========================
404407 const hasDropdown = ! ! hiddenTabs . length ;
@@ -478,6 +481,7 @@ function TabNavList(props: TabNavListProps, ref: React.Ref<HTMLDivElement>) {
478481 ref = { operationsRef }
479482 prefixCls = { prefixCls }
480483 tabs = { hiddenTabs }
484+ moreTabsDropdownProps = { moreTabsDropdownProps }
481485 className = { ! hasDropdown && operationsHiddenClassName }
482486 />
483487
0 commit comments