-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[APM][Settings][Custom links] Default field filter option always present #190309
[APM][Settings][Custom links] Default field filter option always present #190309
Conversation
…lways included in options
…lectOptions tests
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Async chunks
HistoryTo update your PR or re-run it, just comment with: cc @iblancof |
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.
LGTM
const options = { | ||
default: { value: 'DEFAULT', text: 'Select field...' }, | ||
serviceName: { value: 'service.name', text: 'service.name' }, | ||
serviceEnvironment: { value: 'service.environment', text: 'service.environment' }, | ||
transactionType: { value: 'transaction.type', text: 'transaction.type' }, | ||
transactionName: { value: 'transaction.name', text: 'transaction.name' }, | ||
}; | ||
|
||
const filters: Record<string, Filter> = { | ||
empty: { key: '', value: '' }, | ||
default: { key: 'DEFAULT' as Filter['key'], value: '' }, | ||
serviceName: { key: 'service.name', value: 'foo' }, | ||
serviceEnvironment: { key: 'service.environment', value: 'foo' }, | ||
transactionType: { key: 'transaction.type', value: 'foo' }, | ||
transactionName: { key: 'transaction.name', value: 'foo' }, | ||
}; |
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.
nice!
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.
LGTM
…ent (elastic#190309) ## Summary Closes elastic#189987 It was discovered that when users manually select the default option (`Select field`) for the field input, the option would disappear in some scenarios, causing other input values to change automatically. This issue occurred specifically when the default option was selected manually by the user. This happens because as options are selected by the user, they are removed from the selection list to prevent duplicates. With the fix ([commit](elastic@985cdc5)) we are never removing the default option from the list. |Scenario|Before|After| |-|-|-| |Two filters|<img src="https://github.com/user-attachments/assets/2268b92f-e9be-4c06-aa74-5f2f003117d5" width="280"> |<img src="https://github.com/user-attachments/assets/278a4860-f691-4121-acb5-f61a76147b56" width="280">| |More than two filters|<img src="https://github.com/user-attachments/assets/23aeb355-4932-452d-a6a8-ed1a2ccba428" width="280">|<img src="https://github.com/user-attachments/assets/30d7978e-1ec0-4736-8163-64790831bba0" width="280">|
Summary
Closes #189987
It was discovered that when users manually select the default option (
Select field
) for the field input, the option would disappear in some scenarios, causing other input values to change automatically. This issue occurred specifically when the default option was selected manually by the user.This happens because as options are selected by the user, they are removed from the selection list to prevent duplicates.
With the fix (commit) we are never removing the default option from the list.