gregwiechec / Alloy.HideTabs

Allow to hide tab and properties based on conditions
Apache License 2.0
4 stars 5 forks source link

Does not work for "Local Blocks" (i.e. using a block as a property) #7

Open JayWilk opened 4 months ago

JayWilk commented 4 months ago

When using a block as a property, the hiding behaviour does not work.

Replication steps:


    [ContentType(GUID = "089B7DA2-F857-4FC6-89B1-22766BF4F286", AvailableInEditMode = false)]
    public class LocalBlockTest : BlockData
    {
        [Display(Order = 1)]
        [ShowPropertyWhenValueEquals(nameof(PropertyToShow), true)]
        public virtual bool ShowProperty { get; set; }

        [Display(Order = 2)]
        public virtual string? PropertyToShow { get; set; }
    }

Then add it to a page/block like so:

    [Display(GroupName = GroupNames.Content, Order = 20)]
    public virtual LocalBlockTest LocalBlock { get; set; }

Result:

Animation

Same for tabs.