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(frontend): refesh count after nlp sample import #198

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yassinedorbozgithub
Copy link
Contributor

Motivation

The main motivation is to make the count counter updates automatically after the import of nlp sample csv file

Fixes #185

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (Storybook)
  • I have added unit tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@yassinedorbozgithub yassinedorbozgithub added the bug Something isn't working label Oct 10, 2024
@yassinedorbozgithub yassinedorbozgithub self-assigned this Oct 10, 2024
onSuccess: () => {
queryClient.removeQueries({
onSuccess: async () => {
await queryClient.invalidateQueries({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should remove the queries, cause it will still fetch invalidated queries. Or maybe I'm missing something.

Copy link
Contributor Author

@yassinedorbozgithub yassinedorbozgithub Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When i test it with removeQueries the selected queries are removed without triggering a refreshing to update the counts counters but if we invalidate the queries selected, this action will force them to re-fetch and this will update the UI count numbers

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

Successfully merging this pull request may close these issues.

🐛 [BUG] - NLU refresh counts after an nlpSample import
3 participants