Fix antd patch
Summary: Current master is broken, because every click to button treated as two clicks. That leads to weird issues, e.g. enabling / disabling plugins doesn't work because it quickly enables plugin and then disables it back so it looks like nothing happens. Reviewed By: passy Differential Revision: D28364660 fbshipit-source-id: 1ded86c42b6a4a78f3a0f29c942b852f16b4f2d3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ef091e7a07
commit
443152aae7
@@ -1,5 +1,5 @@
|
|||||||
diff --git a/node_modules/antd/es/button/button.js b/node_modules/antd/es/button/button.js
|
diff --git a/node_modules/antd/es/button/button.js b/node_modules/antd/es/button/button.js
|
||||||
index c96d188..06a814b 100644
|
index c96d188..bba8ba5 100644
|
||||||
--- a/node_modules/antd/es/button/button.js
|
--- a/node_modules/antd/es/button/button.js
|
||||||
+++ b/node_modules/antd/es/button/button.js
|
+++ b/node_modules/antd/es/button/button.js
|
||||||
@@ -189,6 +189,8 @@ var InternalButton = function InternalButton(props, ref) {
|
@@ -189,6 +189,8 @@ var InternalButton = function InternalButton(props, ref) {
|
||||||
@@ -11,17 +11,18 @@ index c96d188..06a814b 100644
|
|||||||
var handleClick = function handleClick(e) {
|
var handleClick = function handleClick(e) {
|
||||||
var _a;
|
var _a;
|
||||||
|
|
||||||
@@ -200,6 +202,13 @@ var InternalButton = function InternalButton(props, ref) {
|
@@ -200,7 +202,13 @@ var InternalButton = function InternalButton(props, ref) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (_a = onClick) === null || _a === void 0 ? void 0 : _a(e);
|
||||||
+ if(onClick !== null && onClick !== void 0) {
|
+ if(onClick !== null && onClick !== void 0) {
|
||||||
+ global.flipperTrackInteraction(
|
+ global.flipperTrackInteraction(
|
||||||
+ 'Button', 'onClick', scope, props.title || props.children || props.icon,
|
+ 'Button', 'onClick', scope, props.title || props.children || props.icon,
|
||||||
+ onClick,
|
+ onClick,
|
||||||
+ e
|
+ e
|
||||||
+ );
|
+ );
|
||||||
+ }
|
+ }
|
||||||
(_a = onClick) === null || _a === void 0 ? void 0 : _a(e);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
devWarning(!(typeof icon === 'string' && icon.length > 2), 'Button', "`icon` is using ReactNode instead of string naming in v4. Please check `".concat(icon, "` at https://ant.design/components/icon"));
|
||||||
|
|||||||
Reference in New Issue
Block a user