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

Add up and down arrow support - #30 #41

Merged
merged 5 commits into from
Oct 23, 2022

Conversation

serickson67
Copy link
Contributor

User is now able to navigate up and down through ToDoItems with the up and down arrow keys

  • It will stop the user at the top and bottom of the list and do nothing without throwing any errors
  • It will allow the user to up arrow to the top of the list including the 'add item' TextField

User is now able to navigate up and down through ToDoItems with the up and down arrow keys and it will stop at the top and bottom of the list and do nothing.
@serickson67
Copy link
Contributor Author

Do you want me to fix these on my forked repo branch and open a new pull request? Or are you just going to make those few quick let->const changes? I'm happy to do what I need to do, but as I said in the issue thread - I'm a bit new to all this so I need some instructions on how you'd like me to proceed so that this can get approved and merged! @bhujoshi

@kamalkishor1991 kamalkishor1991 changed the title Fixed issue #30 Add up and down arrow support - #30 Oct 14, 2022
autoFocus
onKeyDown={(e) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please do it with react state instead of dom manupulation.
You should declear a new state for focused item and use that to focus the item and manupulate that state on pressing up and down arrow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry - got a little busy with a few other things, but I'll be working on updating that to use React state instead of dom manipulation early this week. Thanks for the feedback.

@serickson67
Copy link
Contributor Author

@kamalkishor1991 - I made the updates, I think you should be able to see them now:
image

Can you take a look and merge it in or provide additional feedback please?

@kamalkishor1991 kamalkishor1991 merged commit bd5a970 into upnotes-io:master Oct 23, 2022
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.

None yet

2 participants