diff --git a/app/client/src/widgets/ButtonWidget/component/index.tsx b/app/client/src/widgets/ButtonWidget/component/index.tsx index 816ecd81e4..db33ea45f2 100644 --- a/app/client/src/widgets/ButtonWidget/component/index.tsx +++ b/app/client/src/widgets/ButtonWidget/component/index.tsx @@ -303,7 +303,7 @@ interface ButtonComponentProps extends ComponentProps { function RecaptchaV2Component( props: { children: any; - onClick?: (event: React.MouseEvent) => void; + isDisabled?: boolean; recaptchaType?: RecaptchaType; handleError: (event: React.MouseEvent, error: string) => void; } & RecaptchaProps, @@ -314,6 +314,7 @@ function RecaptchaV2Component( props.handleRecaptchaV2Loading && props.handleRecaptchaV2Loading(isloading); }; const handleBtnClick = async (event: React.MouseEvent) => { + if (props.isDisabled) return; if (isInvalidKey) { // Handle incorrent google recaptcha site key props.handleError(event, createMessage(GOOGLE_RECAPTCHA_KEY_ERROR)); @@ -352,7 +353,7 @@ function RecaptchaV2Component( function RecaptchaV3Component( props: { children: any; - onClick?: (event: React.MouseEvent) => void; + isDisabled?: boolean; recaptchaType?: RecaptchaType; handleError: (event: React.MouseEvent, error: string) => void; } & RecaptchaProps, @@ -363,6 +364,7 @@ function RecaptchaV3Component( }; const handleBtnClick = (event: React.MouseEvent) => { + if (props.isDisabled) return; if (status === ScriptStatus.READY) { (window as any).grecaptcha.ready(() => { try { @@ -405,6 +407,7 @@ function RecaptchaV3Component( function BtnWrapper( props: { children: any; + isDisabled?: boolean; onClick?: (event: React.MouseEvent) => void; } & RecaptchaProps, ) { @@ -436,6 +439,7 @@ function ButtonComponent(props: ButtonComponentProps & RecaptchaProps) { clickWithRecaptcha={props.clickWithRecaptcha} googleRecaptchaKey={props.googleRecaptchaKey} handleRecaptchaV2Loading={props.handleRecaptchaV2Loading} + isDisabled={props.isDisabled} onClick={props.onClick} recaptchaType={props.recaptchaType} > diff --git a/app/client/src/widgets/TableWidget/widget/index.tsx b/app/client/src/widgets/TableWidget/widget/index.tsx index 11f84f583f..b7d10ed642 100644 --- a/app/client/src/widgets/TableWidget/widget/index.tsx +++ b/app/client/src/widgets/TableWidget/widget/index.tsx @@ -223,7 +223,7 @@ class TableWidget extends BaseWidget { borderRadius: cellProperties.borderRadius, boxShadow: cellProperties.boxShadow, boxShadowColor: cellProperties.boxShadowColor, - iconName: cellProperties.iconName, + iconName: cellProperties.iconName || "add", iconAlign: cellProperties.iconAlign, isCellVisible: cellProperties.isCellVisible ?? true, label: cellProperties.menuButtonLabel ?? "Open menu",