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

FIO-8819: Removed duplicate request on form manager search #1094

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

roma-formio
Copy link
Contributor

@roma-formio roma-formio commented Sep 4, 2024

Link to Jira Ticket

https://formio.atlassian.net/browse/FIO-8819

Description

Issue: The formManager search calls this.formGrid.pageChanged, which internally calls the refreshGrid method. The refreshGrid method makes an HTTP request to get forms. Additionally, the formManager search also calls this.formGrid.refreshGrid. This results in two refreshGrid calls and two HTTP requests with the same data. Furthermore, the variables this.gridQuery and this.formGrid.query are equal because this.gridQuery is passed as a prop to this.formGrid.

Regarding the clearSearch method: when we manually reassign this.gridQuery to another object, this.gridQuery and this.formGrid.query are no longer equal, so we need to reassign this.formGrid.query before making the API call.

Solution: Remove the second refreshGrid call.

How has this PR been tested?

Manually

Checklist:

  • I have completed the above PR template
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • My changes include tests that prove my fix is effective (or that my feature works as intended)
  • New and existing unit/integration tests pass locally with my changes
  • Any dependent changes have corresponding PRs that are listed above

@brendanbond brendanbond merged commit 2ce8251 into master Sep 4, 2024
5 checks passed
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

Successfully merging this pull request may close these issues.

2 participants