Skip to content

Commit

Permalink
Don't add split part of UI if we have one series (#109483)
Browse files Browse the repository at this point in the history
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
VladLasitsa and kibanamachine authored Aug 30, 2021
1 parent a4c0c1c commit f3562cf
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export function visWithSplits(WrappedComponent) {
[model, palettesService, syncColors, visData]
);

if (!model || !visData || !visData[model.id]) return <WrappedComponent {...props} />;
if (!model || !visData || !visData[model.id] || visData[model.id].series.length === 1)
return <WrappedComponent {...props} />;
if (visData[model.id].series.every((s) => s.id.split(':').length === 1)) {
return <WrappedComponent {...props} />;
}
Expand Down

0 comments on commit f3562cf

Please sign in to comment.