mkermani144 / wanna

💡✔ Wanna is an implementation of a 21st-century to-do list app.
https://wanna.js.org
MIT License
198 stars 30 forks source link

Keyboard shortcut: Add task/idea by pressing Enter #243

Closed mkermani144 closed 6 years ago

mkermani144 commented 6 years ago

It's boring to click the button, especially when you want to add multiple tasks/ideas. Most users expect this keyboard shortcut to be available, as it is in many other applications.

mvinoba commented 6 years ago

Would pressing Enter open the Task or the Idea dialog? Or would it simply open the FAB? I'm willing to help this feature get added, I already coded this feature but it only opens/closes the FAB for now.

mkermani144 commented 6 years ago

@mvinoba It's not about opening the FAB, dialog or anything else, but it's about closing the opened dialog (and adding the idea/task) by pressing Enter. Opening task/idea dialog has been added to the app previously.

mvinoba commented 6 years ago

Sure, I thought of wrapping <HotKeys> in NewIdeaDialog's render's return while defining the approppriate handler and keyMap binding to this.handleRequestAdd. But that didn't work, probably something to do with the focus, perhaps this is beyond my React knowledge. I appreciate your answer anyways.