-
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
Display changed field formats without requiring hard page refresh. #52874
Conversation
@@ -727,7 +726,7 @@ export class FieldEditor extends PureComponent { | |||
if (!fieldFormatId) { | |||
indexPattern.fieldFormatMap[field.name] = undefined; | |||
} else { | |||
indexPattern.fieldFormatMap[field.name] = fieldFormat; |
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.
regression of #48108.
indexPattern.fieldFormatMap[field.name] = field.format;
- was right
@@ -94,7 +94,8 @@ export class Field implements IFieldType { | |||
if (!type) type = getKbnFieldType('unknown'); | |||
|
|||
let format = spec.format; | |||
if (!format || !(format instanceof FieldFormat)) { |
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.
e1494b9
to
cce0702
Compare
💚 Build SucceededTo update your PR or re-run it, just comment with: |
Pinging @elastic/kibana-app-arch (Team:AppArch) |
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.
@alexwizp I'm testing locally and having a hard time getting this to work. Steps to reproduce:
- Load web logs sample data
- Update index pattern to set
ip
field to useUrl
format with a relative hyperlink - Link appears in Discover as expected
- But if you create a data table vis, and/or add the table to a dashboard, it isn't working
Am I missing a step?
It would also be great if we could add a functional test for this case, since it is easy to forget to test this manually. I was planning on looking into this today, but I can't really do much without seeing the fix in place.
@lukeelmers Hm... I've tested only on Discovery. Without my changes we have issue on step 3 |
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.
This LGTM. While it doesn't address the exact use case in #35235, it still addresses a related bug which should be resolved & backported.
Will keep the original issue open until the problem with URL formatters is also resolved.
Addresses part of #35235
Summary
Resolves an issue where changing a field format and navigating back to discover/visualizations/dashboard requires a hard page refresh in order to see the changes that were made. This relates to the issue reported in #35235
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers