Skip to content

Commit

Permalink
expand first 3 pipelines by default
Browse files Browse the repository at this point in the history
  • Loading branch information
darnautov committed Nov 16, 2021
1 parent a4ab250 commit c3ed3e4
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ export const ModelPipelines: FC<ModelPipelinesProps> = ({ pipelines, ingestStats

return (
<>
{Object.entries(pipelines).map(([pipelineName, pipelineDefinition]) => {
{Object.entries(pipelines).map(([pipelineName, pipelineDefinition], i) => {
// Expand first 3 pipelines by default
const initialIsOpen = i <= 2;
return (
<>
<EuiAccordion
Expand Down Expand Up @@ -66,6 +68,7 @@ export const ModelPipelines: FC<ModelPipelinesProps> = ({ pipelines, ingestStats
</EuiButtonEmpty>
}
paddingSize="l"
initialIsOpen={initialIsOpen}
>
<EuiFlexGrid columns={2}>
{ingestStats?.pipelines ? (
Expand Down

0 comments on commit c3ed3e4

Please sign in to comment.