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:[Unfork] Reset repository picker options after submission [fixes #25] #26

Merged
merged 3 commits into from
Oct 5, 2022

Conversation

najeebkp
Copy link
Contributor

@najeebkp najeebkp commented Oct 4, 2022

Fix:[Unfork] Reset repository picker options after submission [fixes #25]

small setSelectedItem([]) change added after the delete response.

@vercel
Copy link

vercel bot commented Oct 4, 2022

Someone is attempting to deploy a commit to a Personal Account owned by @lyqht on Vercel.

@lyqht first needs to authorize it.

@vercel
Copy link

vercel bot commented Oct 4, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
octokit-lite ✅ Ready (Inspect) Visit Preview Oct 5, 2022 at 10:31AM (UTC)

@lyqht
Copy link
Owner

lyqht commented Oct 5, 2022

hi @najeebkp, currently there's a behavior that after you deleted an item and reset the selectedItems state, the dropdown doesn't jump back to the top — might be something to do with highlightedIndex. could you help to look into that?

@najeebkp
Copy link
Contributor Author

najeebkp commented Oct 5, 2022

i didn't understand. can you show some screenshots and explain?

@lyqht
Copy link
Owner

lyqht commented Oct 5, 2022

Initial state

image

After deleting repositories — it doesn't automatically go back up to the top of the dropdown, so you can't see the group label.

image

@najeebkp
Copy link
Contributor Author

najeebkp commented Oct 5, 2022

Hey i checked it for couple of hours. Actually setHighlighted index works -> so that it takes to the 0th index. but it doesnot recognises the top filter as an element. that is the issue. i couldn't find a solution to fix that.

@lyqht
Copy link
Owner

lyqht commented Oct 5, 2022

Hello thanks for looking into it! Could you see if it's possible to attach a ref to the drop-down and scroll to the top of that drop-down after you have set the selected items as an empty array?

@najeebkp
Copy link
Contributor Author

najeebkp commented Oct 5, 2022

i'll check it

@najeebkp
Copy link
Contributor Author

najeebkp commented Oct 5, 2022

@lyqht Check it out !

@lyqht
Copy link
Owner

lyqht commented Oct 5, 2022

Good job! Thanks for your work on this ✨

@lyqht lyqht merged commit 1528946 into lyqht:main Oct 5, 2022
@lyqht lyqht self-assigned this Oct 19, 2022
@lyqht lyqht removed their assignment Oct 30, 2022
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.

[Unfork] Reset repository picker options after submission
2 participants