File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1+ const isValid = value => {
2+ return value !== undefined && value !== null && value !== '' ;
3+ } ;
4+ export default isValid ;
Original file line number Diff line number Diff line change @@ -72,11 +72,11 @@ const TabBar = {
7272
7373 if ( renderTabBar ) {
7474 RenderTabBar = renderTabBar ( renderProps , ScrollableInkTabBar ) ;
75+ // https://github.com/vueComponent/ant-design-vue/issues/2157
76+ return cloneElement ( RenderTabBar , renderProps ) ;
7577 } else {
76- RenderTabBar = < ScrollableInkTabBar { ...renderProps } /> ;
78+ return < ScrollableInkTabBar { ...renderProps } /> ;
7779 }
78- // https://github.com/vueComponent/ant-design-vue/issues/2157
79- return cloneElement ( RenderTabBar , renderProps ) ;
8080 } ,
8181} ;
8282
Original file line number Diff line number Diff line change @@ -6,12 +6,13 @@ import KeyCode from './KeyCode';
66import { getOptionProps , getListeners } from '../../_util/props-util' ;
77import { cloneElement } from '../../_util/vnode' ;
88import Sentinel from './Sentinel' ;
9+ import isValid from '../../_util/isValid' ;
910
1011function getDefaultActiveKey ( props ) {
1112 let activeKey ;
1213 const children = props . children ;
1314 children . forEach ( child => {
14- if ( child && ! activeKey && ! child . disabled ) {
15+ if ( child && ! isValid ( activeKey ) && ! child . disabled ) {
1516 activeKey = child . key ;
1617 }
1718 } ) ;
You can’t perform that action at this time.
0 commit comments