Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[Lens] Clean up operations code #43784
[Lens] Clean up operations code #43784
Changes from 13 commits
b148492
8d380b7
694e845
3cec779
54ad77c
82a4fc8
a8ab4b5
544b4d7
73cdade
3a6a23c
0ff7523
4729ae4
822b41e
1625be3
2b91dfe
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 seems trivial to compute from the other props (layerId, columnId, state), so why pass it in separately?
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.
My comment in the description about this was probably not super clear:
It's because of types -
columns
is aRecord<string, IndexPatternColumn>
, but inside of the param editor we need the specific type,TermsIndexPatternColumn
,DateHistogramIndexPatternColumn
and so on. We can cast it in there (that's how it was done before), but I try to get rid of casts where possible because they are a type mismatch waiting to happen. Doing it here is also implicitly casting the type to right one, but it's only a single place compared to the n places within in the param editor components, so less surface to get it wrong in the future.