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: re-introduce prevSelectedId to change focus when selection changes #1091

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

TheAlmightyCrumb
Copy link
Contributor

@TheAlmightyCrumb TheAlmightyCrumb commented Jan 14, 2025

Re-introduce the anti-pattern of changing a state while in the rendering phase (unless a better way exists) to sync focus to selection changes.

now it gets the id of the item last selected if there is no focus
@TheAlmightyCrumb
Copy link
Contributor Author

@alissawix @PeterShershov Please inspect this commit: cd361a1
Let me know what you think about it.
If agreed - I'll refactor the hook, mostly names so it is coherent, and rename files correspondingly.

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