-
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
[FieldFormatters] Use default values for URL formatter #113141
[FieldFormatters] Use default values for URL formatter #113141
Conversation
When no formatter parameters are passed, the default formatter parameters should be used.
Hey @Tacklebox, I have removed myself from review because I haven't touched this code in many years (since it was all in Angular) except for broad changes regarding ESLint and the like. I suspect that someone from @elastic/kibana-app-services will be able to give you a much more usable review. |
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @Tacklebox |
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.
tested, works well 👍
* [FieldFormatters] Use default values for URL formatter
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
WOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO |
Summary
close #112238 (comment)
The default behavior when creating a URL formatter is to have the type set to
link
, But the link specific field wasn't being shown until the the type select box had a transition to the link select from a different type. This was caused because the default for the type field is link, but the formatter props still have type as undefined. I addressed the issue by callingformat.getParamDefaults()
and coalescing it with the provided type prop.Before this PR:

After this PR:

Checklist
The unit tests passed without modification. However, they also passed before, despite the snapshot including the html for the "Open in new tab" toggle. So I may be running them incorrectly.
For maintainers
Release Notes
Fix url formatter editor "Open in new tab" is hidden by default