stuyspec / cms

New CMS using React + Typescript.
MIT License
5 stars 10 forks source link

Trigger the Search Function on Enter Key #65

Open dchen278 opened 3 years ago

dchen278 commented 3 years ago

On the search bar for both the articles and drafts page, you have to click the search icon to actually search. To make the UX nicer, implement a feature such that when you press enter, it searches the query.

EricShi1255 commented 3 years ago

Enter key already triggers search, though e.key could be used to in addition to e.keyCode, which is apparently deprecated. Not really related but search doesn't work or takes too long if you try a broad term like "study", which might've made it seem like it wasn't working