Skip to content

Commit a81c75a

Browse files
zombieJRedJue
authored andcommitted
fix: Popconfirm loading should finish (ant-design#41121)
* fix: Popconfirm loading should finish * chore: update bug version
1 parent d76ba28 commit a81c75a

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

components/_util/ActionButton.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ const ActionButton: React.FC<ActionButtonProps> = (props) => {
6262
setLoading(true);
6363
returnValueOfOnOk!.then(
6464
(...args: any[]) => {
65+
setLoading(false, true);
6566
onInternalClose(...args);
6667
clickedRef.current = false;
6768
},

components/modal/style/index.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type React from 'react';
2+
import { clearFix, genFocusStyle, resetComponent } from '../../style';
23
import { initFadeMotion, initZoomMotion } from '../../style/motion';
34
import type { AliasToken, FullToken, GenerateStyle } from '../../theme/internal';
45
import { genComponentStyleHook, mergeToken } from '../../theme/internal';
56
import type { TokenWithCommonCls } from '../../theme/util/genComponentStyleHook';
6-
import { clearFix, genFocusStyle, resetComponent } from '../../style';
77

88
/** Component only token. Which will handle additional calculation of alias token */
99
export interface ComponentToken {
@@ -47,12 +47,12 @@ function box(position: React.CSSProperties['position']): React.CSSProperties {
4747
}
4848

4949
export const genModalMaskStyle: GenerateStyle<TokenWithCommonCls<AliasToken>> = (token) => {
50-
const { componentCls } = token;
50+
const { componentCls, antCls } = token;
5151

5252
return [
5353
{
5454
[`${componentCls}-root`]: {
55-
[`${componentCls}${token.antCls}-zoom-enter, ${componentCls}${token.antCls}-zoom-appear`]: {
55+
[`${componentCls}${antCls}-zoom-enter, ${componentCls}${antCls}-zoom-appear`]: {
5656
// reset scale avoid mousePosition bug
5757
transform: 'none',
5858
opacity: 0,
@@ -61,6 +61,12 @@ export const genModalMaskStyle: GenerateStyle<TokenWithCommonCls<AliasToken>> =
6161
userSelect: 'none',
6262
},
6363

64+
// https://github.com/ant-design/ant-design/issues/37329
65+
// https://github.com/ant-design/ant-design/issues/40272
66+
[`${componentCls}${antCls}-zoom-leave ${componentCls}-content`]: {
67+
pointerEvents: 'none',
68+
},
69+
6470
[`${componentCls}-mask`]: {
6571
...box('fixed'),
6672
zIndex: token.zIndexPopupBase,
@@ -349,11 +355,6 @@ const genModalConfirmStyle: GenerateStyle<ModalToken> = (token) => {
349355
[`${confirmComponentCls}-success ${confirmComponentCls}-body > ${token.iconCls}`]: {
350356
color: token.colorSuccess,
351357
},
352-
353-
// https://github.com/ant-design/ant-design/issues/37329
354-
[`${componentCls}-zoom-leave ${componentCls}-btns`]: {
355-
pointerEvents: 'none',
356-
},
357358
};
358359
};
359360

scripts/post-script.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ const DEPRECIATED_VERSION = {
2929
'5.1.2': ['https://github.com/ant-design/ant-design/issues/39949'],
3030
'5.1.3': ['https://github.com/ant-design/ant-design/issues/40113'],
3131
'5.1.4': ['https://github.com/ant-design/ant-design/issues/40186'],
32+
'>= 5.2.3 <= 5.3.0': [
33+
'https://github.com/ant-design/ant-design/pull/40719#issuecomment-1453418135',
34+
],
3235
};
3336

3437
function matchDeprecated(version) {

0 commit comments

Comments
 (0)