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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting columnFilters to undefined in initialState #1275

Open
1 task done
joelbong opened this issue Oct 22, 2024 · 0 comments
Open
1 task done

Setting columnFilters to undefined in initialState #1275

joelbong opened this issue Oct 22, 2024 · 0 comments

Comments

@joelbong
Copy link

material-react-table version

3.0.1

react & react-dom versions

18.3.1

Describe the bug and the steps to reproduce it

When explicitly setting columnFilters in initialState to undefined, it can sometimes cause an error (though it's not consistently reproducible). The issue occurs here. To address this, either ensure that the code checks for the possibility that columnFilters can be undefined, or prevent columnFilters from being set to undefined in the initial state, as indicated by the type definition: initialState?: Partial<MRT_TableState>. While the error isn't always reproducible, I was able to replicate it in a production build using ViteJS 5.3.4.

Minimal, Reproducible Example - (Optional, but Recommended)

  1. Set columnFilters to undefined in initialState

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

Yes, I think I know how to fix it and will discuss it in the comments of this issue

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
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