Menno
09/26/2023, 7:23 AMSendingContentNotification
and that tab has a property using the Umbraco.DropDown.Flexible
editor then the selected value inside that dropdown is lost when the node is saved by someone who doesn't see that tab. This behaviour is different from some other editors like the Umbraco.RadioButtonList
or the Umbraco.TextBox
. What causes this property editor to behave differently and is this intended? And is this something that is worth making an issue for in GitHub?Matt Wise
09/26/2023, 7:56 AMMenno
09/26/2023, 8:18 AMcs
public void Handle(SendingContentNotification notification)
{
if (IsAdmin())
{
return;
}
var content = notification.Content;
var variants = content.Variants;
foreach (var variant in variants)
{
variant.Tabs = variant.Tabs.Where(x => x.Alias != "settings");
}
}
This is a simplified version I've build to see if this is also an issue in Umbraco v12 but it's the same principle.Matt Wise
09/26/2023, 8:20 AMMenno
09/26/2023, 8:34 AMMenno
09/26/2023, 8:59 AMtab.Type
to an empty string does work however.Menno
09/26/2023, 9:00 AMtab.IsActive
to be used in hiding the tab but setting that property to false doesn't seem to do anything.Matt Wise
09/26/2023, 9:04 AMMatt Wise
09/26/2023, 9:04 AMMenno
09/26/2023, 2:31 PMtab.Type
is an integer. Setting it to -1 also hides the tab in that version.