diff --git a/src/Elastic.ApiExplorer/Components/PropertyTree/_Partials/_UnionOptions.cshtml b/src/Elastic.ApiExplorer/Components/PropertyTree/_Partials/_UnionOptions.cshtml index 61c96b3726..3e11acadab 100644 --- a/src/Elastic.ApiExplorer/Components/PropertyTree/_Partials/_UnionOptions.cshtml +++ b/src/Elastic.ApiExplorer/Components/PropertyTree/_Partials/_UnionOptions.cshtml @@ -66,15 +66,16 @@ var variant = Model.Variants[i]; // A picked chip is the choice to read that variant: its fields show at once, and its chip already names it, so // the label keeps only what the chip does not say (the discriminator value, the link to the type's page, or - // that the variant is an array). - var collapsible = variant.IsCollapsible && !Model.UseChips; + // that the variant is an array). The fields still fold behind the toggle, for a shorter view. + var collapsible = variant.IsCollapsible; + var expanded = Model.UseChips || variant.DefaultExpanded; var folded = variant.UseHidden && !Model.UseChips; // An array variant keeps its "X[]" heading, so its fields read as each item's; a primitive keeps its type, which is // all its panel has to show. var showName = !Model.UseChips || variant.PageUrl is { Length: > 0 } || variant.IsArrayVariant || !variant.IsObjectType; var showLabel = showName || variant.DiscriminatorLabel is { Length: > 0 }; -