[TSVB] Technical debt - remove default_index_pattern and default_timefield from model#95925
Conversation
74daefb to
e2c3d3b
Compare
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
Pinging @elastic/kibana-app (Team:KibanaApp) |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
| this.setState((state) => ({ | ||
| defaultIndex: index, | ||
| model: { | ||
| ...state.model, |
There was a problem hiding this comment.
I think that now can be simplifed to:
this.setState({
defaultIndex: index,
visFields,
});
You don't change something to model, so no need to update it, if I understand the code correctly
There was a problem hiding this comment.
good point! thank you
41dd230 to
809841d
Compare
stratoula
left a comment
There was a problem hiding this comment.
LGTM, tested it locally and it seems that everything works fine
|
@elasticmachine run elasticsearch-ci/docs |
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @alexwizp |
…field from model (elastic#95925) * [TSVB] Technical debt - remove default_index_pattern and default_timefield from model * Update vis_editor.tsx Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…field from model (#95925) (#96385) * [TSVB] Technical debt - remove default_index_pattern and default_timefield from model * Update vis_editor.tsx Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Summary
After saving TSVB rendering, two extra properties appear in the model:
default_index_pattern,default_timefieldThis is due to the fact that we get the default index in the parent component and then pass it through the model. It's wrong and this PR fix that.