[FieldFormatters] Use default values for URL formatter#113141
[FieldFormatters] Use default values for URL formatter#113141Tacklebox merged 2 commits intoelastic:masterfrom Tacklebox:URL-formatter-open-in-new-tab
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 |
* [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