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

feat: remove lens from cache on control unregister #11

Merged
merged 2 commits into from
Apr 6, 2025

Conversation

aspirisen
Copy link
Collaborator

To detect that control is unregistered I subscribe for updates control?._subjects?.values?.subscribe?. But not sure if it the best solution.

@aspirisen aspirisen self-assigned this Mar 19, 2025
@aspirisen aspirisen requested a review from bluebill1049 March 19, 2025 09:54
@aspirisen
Copy link
Collaborator Author

@bluebill1049 could you please review this pr

@bluebill1049
Copy link
Member

To detect that control is unregistered I subscribe for updates control?._subjects?.values?.subscribe?. But not sure if it the best solution.

yea, this may be a bit tricky. I may need to expose another subscription to info with unmounted fields.

@aspirisen
Copy link
Collaborator Author

Maybe such solution is enough for now, I will create a ticket to adjust react-hook-form api for lenses

Copy link
Member

@bluebill1049 bluebill1049 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@aspirisen aspirisen merged commit 4203ead into main Apr 6, 2025
5 checks passed
Copy link

github-actions bot commented Apr 6, 2025

🎉 This PR is included in version 0.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants