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

fix: do not call accessorFn if table is loading #308

Conversation

alessandrojcm
Copy link
Collaborator

If accessorFn is defined, make sure not to call it if the table is loading.

Closes #304

@alessandrojcm alessandrojcm added bug Something isn't working V2 Issue with MRT V2 labels Apr 12, 2024
@alessandrojcm alessandrojcm self-assigned this Apr 12, 2024
Copy link

vercel bot commented Apr 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mantine-react-table ❌ Failed (Inspect) Apr 12, 2024 5:12pm
mantine-react-table-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 12, 2024 5:12pm

@alessandrojcm
Copy link
Collaborator Author

Should I fix this for v1 as well?

@sdumjahn
Copy link

I have an issue, where the accessorFn gets not called anymore after the table went from state loading = true to loading = false. With the beta.1 there was no issue. Could it be that the value of tableOptions?.state?.isLoading? gets cached after creating the wrapper function and therefore any change to the state does not change the state of the wrapper function?

@KevinVandy
Copy link
Owner

Looking at the change that was made here, I'm not all the way sure it was correct. Might need to confirm this was ok or readdress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working V2 Issue with MRT V2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

accessorFn causes exception when state.isLoading is true and data is empty array
3 participants