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): 🐛 focus the popover on loop from both ends #159

Merged
merged 2 commits into from
Nov 20, 2020

Conversation

navin-moorthy
Copy link
Collaborator

@navin-moorthy navin-moorthy commented Nov 19, 2020

closes #156

@netlify
Copy link

netlify bot commented Nov 19, 2020

Deploy preview for renderless-components ready!

Built with commit 6a12188

https://deploy-preview-159--renderless-components.netlify.app

@navin-moorthy navin-moorthy self-assigned this Nov 19, 2020
@navin-moorthy navin-moorthy added the enhancements 📈 Improve an existing Feature label Nov 19, 2020
@@ -14,15 +14,11 @@ import {
export function useSelectListState(
initialState: SealedInitialState<SelectListInitialState> = {},
): SelectListStateReturn {
const {
currentId = null,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thats because I removed this !

Now by default current id will be on the first tabbable element as programmed in composite.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This will only affect the currentValue not the selectedValue.

If the selectedValue is changed, currentId will change on useEffect when visible
image

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it!

@navin-moorthy navin-moorthy merged commit 3eafebd into master Nov 20, 2020
@navin-moorthy navin-moorthy deleted the navin-moorthy/issue156 branch November 20, 2020 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancements 📈 Improve an existing Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Select] Do not focus Composite when looping through CompositeItem
2 participants