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(select): select check additional count event loop #743

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

AykutSarac
Copy link
Member

Fixes select causing the window to be frozen on choosing x amount of options. This is caused by running _checkAdditionalItemCount within updated for each update instead of listening for selected options only.

@AykutSarac
Copy link
Member Author

This still not a very viable solution, it is running multiple times for one selection.

@leventozen leventozen self-requested a review November 22, 2023 14:55
Copy link
Member

@leventozen leventozen left a comment

Choose a reason for hiding this comment

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

After testing it, I've experienced that the _checkAdditionalItemCount method is now running only once per selection, am I missing anythng? Additionally, during the initial load it runs 3 times. We might consider optimizing the registerOption method and lifecycles to reduce these initial runs in the future. However, I believe this implementation meets our current needs well.
ps: Let's not forget to create an issue for potential future enhancements.

@AykutSarac
Copy link
Member Author

After testing it, I've experienced that the _checkAdditionalItemCount method is now running only once per selection, am I missing anythng? Additionally, during the initial load it runs 3 times. We might consider optimizing the registerOption method and lifecycles to reduce these initial runs in the future. However, I believe this implementation meets our current needs well. ps: Let's not forget to create an issue for potential future enhancements.

We could accept this as a workaround, but this is still problematic. It should and only run once when an option is selected/removed, unfortunately rerenders are effecting this and causing to run more than necessary.

@AykutSarac AykutSarac merged commit 43d6b0d into next Nov 23, 2023
7 checks passed
@AykutSarac AykutSarac deleted the fix/select-itemcount-check branch November 23, 2023 12:48
Copy link

🎉 This PR is included in version 2.4.0-beta.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

This was referenced Jan 25, 2024
Copy link

🎉 This PR is included in version 3.0.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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants