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 review filter #14866

Merged
merged 1 commit into from
Nov 8, 2024
Merged

Fix review filter #14866

merged 1 commit into from
Nov 8, 2024

Conversation

hawkeye217
Copy link
Collaborator

Proposed change

Because of the way we are using the custom hook for managing state with url parameters, there is no easy way to do a functional state update. Two calls to the update filter function in succession would be a race and the filter dropdown wouldn't always reflect the chosen state. This PR refactors the general review filter to only call the onUpdateFilter function once.

This can be further improved by using nuqsand using the url parameters for state management, but that will require more work and testing.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code
  • Documentation Update

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • The code has been formatted using Ruff (ruff format frigate)

Copy link

netlify bot commented Nov 8, 2024

Deploy Preview for frigate-docs ready!

Name Link
🔨 Latest commit 7a040e1
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/672e13255b92b500098315be
😎 Deploy Preview https://deploy-preview-14866--frigate-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@hawkeye217 hawkeye217 merged commit ae30ac6 into dev Nov 8, 2024
13 checks passed
@hawkeye217 hawkeye217 deleted the general-filter-fix branch November 8, 2024 13:45
@hawkeye217 hawkeye217 mentioned this pull request Nov 8, 2024
10 tasks
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