Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bug: Cannot read properties of null (reading 'filter' or reading 'push') with createRoot - react@18 #416

Open
vuphan365 opened this issue Apr 9, 2024 · 0 comments

Comments

@vuphan365
Copy link

vuphan365 commented Apr 9, 2024

  • what edition are you using - community
  • version for @inovua/reactdatagrid-community: 5.10.2
  • React: 18.2.0
  • React-dom: 18.2.0

Relevant code or config

 componentWillUnmount() {
      this.cells = null;
      this.unlockedCells = null;
  }

What you did:

What happened:

  • this.cells is never change values back to array ([]) after re-mount, it will throw the error whenever call any methods from this variable

Screenshot 2024-04-09 at 21 57 25

Sandbox:

Suggested solution:

  • Instead of reset this.cells to null, we can set it to be []
 componentWillUnmount() {
      this.cells = [];
      this.unlockedCells = [];
  }
@vuphan365 vuphan365 changed the title 馃悰 Bug: Cannot read properties of null (reading 'filter' or reading 'push') 馃悰 Bug: Cannot read properties of null (reading 'filter' or reading 'push') with createRoot - react@18 Apr 9, 2024
MuhammadSawalhy added a commit to MuhammadSawalhy/reactdatagrid that referenced this issue Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant