diff --git a/components/tabs/index.js b/components/tabs/index.js index 639756774..cf4194ce2 100644 --- a/components/tabs/index.js +++ b/components/tabs/index.js @@ -1,6 +1,6 @@ import Tabs from './tabs' -import TabPane from './src/TabPane' -import TabContent from './src/TabContent' +import TabPane from '../vc-tabs/src/TabPane' +import TabContent from '../vc-tabs/src/TabContent' Tabs.TabPane = TabPane export default Tabs export { TabPane, TabContent } diff --git a/components/tabs/tabs.jsx b/components/tabs/tabs.jsx index bc6d28144..757b6bfe2 100644 --- a/components/tabs/tabs.jsx +++ b/components/tabs/tabs.jsx @@ -1,5 +1,5 @@ -import Tabs from './src/Tabs' +import Tabs from '../vc-tabs/src/Tabs' import isFlexSupported from '../_util/isFlexSupported' import { hasProp, getComponentFromProp, getComponentName, isEmptyElement } from '../_util/props-util' import warning from '../_util/warning' diff --git a/components/vc-pagination/Pagination.jsx b/components/vc-pagination/Pagination.jsx index eb60908ac..20cc472c4 100644 --- a/components/vc-pagination/Pagination.jsx +++ b/components/vc-pagination/Pagination.jsx @@ -93,6 +93,20 @@ export default { newState.statePageSize = val this.setState(newState) }, + stateCurrent(val, oldValue) { + // When current page change, fix focused style of prev item + // A hacky solution of https://github.com/ant-design/ant-design/issues/8948 + this.$nextTick(()=>{ + if(this.$refs.paginationNode) { + const lastCurrentNode = this.$refs.paginationNode.querySelector( + `.${this.prefixCls}-item-${oldValue}` + ); + if (lastCurrentNode && document.activeElement === lastCurrentNode) { + lastCurrentNode.blur(); + } + } + }) + }, }, methods: { isValid (page) { @@ -494,6 +508,7 @@ export default {