feat(new-webui): Enable query submission via Enter key (resolves #943).#957
Conversation
|
""" WalkthroughThe changes wrap the Changes
Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes detected. Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)`**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}`: - Prefer `false == ` rather than `!`.
🧬 Code Graph Analysis (1)components/log-viewer-webui/client/src/pages/SearchPage/SearchControls/index.tsx (1)
🔇 Additional comments (2)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
junhaoliao
left a comment
There was a problem hiding this comment.
Implementation is just to wrap the search controls in a form
nice
I also explicitly removed behaviour for cancel button, I think this is better. I think on old webui enter would also cancel query.
sure. i think once we add better support real time ingestion, while a search is progressing, we could also restart searches when a user hits the Return key. anyways we don't need this for now
for the PR title, do you think this is more concise?
feat(new-webui): Enable query submission via Enter key (resolves #943).
| onSubmit={(e) => { | ||
| e.preventDefault(); | ||
| }} |
There was a problem hiding this comment.
let's extract this and use useCallback to wrap the definition
There was a problem hiding this comment.
I just moved it out of component. The effect should be the same just without useCallback
…Controls/index.tsx Co-authored-by: Junhao Liao <junhao@junhao.ca>
Description
When user hits enter, the query will now submit. Resolves #943
Implementation is just to wrap the search controls in a form, and prevent default behaviour from triggering page load.
I also explicitly removed behaviour for cancel button, I think this is better. I think on old webui enter would also cancel query.
Checklist
breaking change.
Validation performed
Tested enter submits query.
Summary by CodeRabbit
Summary by CodeRabbit