hunk.code_window:   }
     componentDidMount() {
       this.pageSize = this.getPageSize();
       if (this.shouldUpdatePageSize()) {
         this.updatePageSize();
       }
  
hunk.labels: keep keep keep keep replace keep keep keep
hunk.after_edit:     if (this.props.pageSize === this.pageSize) {
         this.pageSizeUpdated = true;
       }
       if (this.shouldUpdatePageSize() && !this.pageSizeUpdated) {
  
hunk.file_path: app/client/src/widgets/ListWidgetV2/widget/index.tsx
hunk.type: replace
file: import React, { ReactNode } from "react";
  import styled from "styled-components";
  import * as Sentry from "@sentry/react";
  import * as log from "loglevel";
  
  type Props = { children: ReactNode };
  type State = { hasError: boolean };
  
  const ErrorBoundaryContainer = styled.div`
    height: 100%;
    width: 100%;
  `;
  
  const RetryLink = styled.span`
    color: ${(props) => props.theme.colors.primaryDarkest};
    cursor: pointer;
  `;
  
  class ErrorBoundary extends React.Component<Props, State> {
    constructor(props: Props) {
      super(props);
      this.state = { hasError: false };
    }
  
    static getDerivedStateFromError() {
      // Update state so the next render will show the fallback UI.
      return { hasError: true };
    }
  
    componentDidCatch(error: any, errorInfo: any) {
      log.error({ error, errorInfo });
      Sentry.captureException(error);
    }
  
    render() {
      return (
        <ErrorBoundaryContainer className="error-boundary">
          {this.state.hasError ? (
            <p>
              Oops, Something went wrong.
              <br />
              <RetryLink onClick={() => this.setState({ hasError: false })}>
                Click here to retry
              </RetryLink>
            </p>
          ) : (
            this.props.children
          )}
        </ErrorBoundaryContainer>
      );
    }
  }
  
  export default ErrorBoundary;
  