diff --git a/app/client/src/widgets/BaseWidget.tsx b/app/client/src/widgets/BaseWidget.tsx
index 196f432bc7..dd66ef1ebb 100644
--- a/app/client/src/widgets/BaseWidget.tsx
+++ b/app/client/src/widgets/BaseWidget.tsx
@@ -169,7 +169,14 @@ abstract class BaseWidget<
}
render() {
- return this.getWidgetView();
+ let isValid = true;
+ if (this.props.invalidProps) {
+ isValid = _.keys(this.props.invalidProps).length === 0;
+ }
+ if (this.props.isLoading) isValid = true;
+ return (
+ {this.getWidgetView()}
+ );
}
private getWidgetView(): JSX.Element {
@@ -205,7 +212,7 @@ abstract class BaseWidget<
this.props.widgetId === "0"
}
>
- {this.getPageView()}
+ {this.getPageView()}
);
}
@@ -218,14 +225,7 @@ abstract class BaseWidget<
abstract getPageView(): JSX.Element;
getCanvasView(): JSX.Element {
- let isValid = true;
- if (this.props.invalidProps) {
- isValid = _.keys(this.props.invalidProps).length === 0;
- }
- if (this.props.isLoading) isValid = true;
- return (
- {this.getPageView()}
- );
+ return this.getPageView();
}
// TODO(Nikhil): Revisit the inclusion of another library for shallowEqual.