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

Don't fetch field_caps on TimeRange update spam #126

Merged
merged 1 commit into from
May 9, 2024

Conversation

ddelemeny
Copy link
Contributor

The QueryEditor component may be re-rendered a few times in a row with slightly different "now" timestamps. which causes the field suggestions to be fetched as many times.

This PR introduces a range similarity check in the useDatasourceFields hook, which filters out TimeRange updates if the changed values are within a minute of the known ones.

@ddelemeny ddelemeny merged commit ad87ff5 into main May 9, 2024
2 checks passed
@ddelemeny ddelemeny deleted the ddelemeny/fix-fieldcaps-spam branch May 20, 2024 19:08
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.

1 participant