-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Logs UI] Improve log threshold rule field selection #111135
[Logs UI] Improve log threshold rule field selection #111135
Conversation
Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui) |
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works pretty well, nice touch to close the whole popover on selection. 👏
I found just one edge case which I commented on below.
(e) => { | ||
const fieldName = e.target.value; | ||
([selectedOption]) => { | ||
const fieldName = selectedOption.label; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I press backspace in the input field of the combobox this seems to be called with selectedOption
being undefined
because the array is empty for one call. Can we handle that case somehow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
81344c1
to
004ffb6
Compare
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nicely done 👏
* [Logs UI] Use ComboBox for criterion field selection (elastic#110996 * [Logs UI] Make log threshold criterion field clearable
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
* [Logs UI] Use ComboBox for criterion field selection (#110996 * [Logs UI] Make log threshold criterion field clearable Co-authored-by: Milton Hultgren <[email protected]>
Summary
Fixes #110611
The use of
select
for the field when creating a Log Treshold rule made it harder to find and select the desired field in a dataset with a lot of fields. This PR makes the expression use acomboBox
instead to allow users to search for the field they want while still seeing some suggestions.Checklist
For maintainers