Merge branch 'fix/widget-sentry' into 'release'
Moving error boundary to allow for sentry errors. See merge request theappsmith/internal-tools-client!380
This commit is contained in:
commit
120b62cb8a
|
|
@ -169,7 +169,14 @@ abstract class BaseWidget<
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
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 (
|
||||||
|
<ErrorBoundary isValid={isValid}>{this.getWidgetView()}</ErrorBoundary>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private getWidgetView(): JSX.Element {
|
private getWidgetView(): JSX.Element {
|
||||||
|
|
@ -205,7 +212,7 @@ abstract class BaseWidget<
|
||||||
this.props.widgetId === "0"
|
this.props.widgetId === "0"
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<ErrorBoundary isValid>{this.getPageView()}</ErrorBoundary>
|
{this.getPageView()}
|
||||||
</PositionedContainer>
|
</PositionedContainer>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -218,14 +225,7 @@ abstract class BaseWidget<
|
||||||
abstract getPageView(): JSX.Element;
|
abstract getPageView(): JSX.Element;
|
||||||
|
|
||||||
getCanvasView(): JSX.Element {
|
getCanvasView(): JSX.Element {
|
||||||
let isValid = true;
|
return this.getPageView();
|
||||||
if (this.props.invalidProps) {
|
|
||||||
isValid = _.keys(this.props.invalidProps).length === 0;
|
|
||||||
}
|
|
||||||
if (this.props.isLoading) isValid = true;
|
|
||||||
return (
|
|
||||||
<ErrorBoundary isValid={isValid}>{this.getPageView()}</ErrorBoundary>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(Nikhil): Revisit the inclusion of another library for shallowEqual.
|
// TODO(Nikhil): Revisit the inclusion of another library for shallowEqual.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user