Geta / geta-optimizely-genericlinks

An extensive alternative to LinkItemCollection in Optimizely.
Apache License 2.0
4 stars 0 forks source link

Custom boolean value resets when published #30

Open alex-finnigan-mando opened 2 months ago

alex-finnigan-mando commented 2 months ago

This issue was previously mentioned in #10 but was closed by the author without commenting. I'm hoping I just need advice on this one.

We have a custom field used to simplify the setting of a URL target:

[Display(Name = "Open In New Tab")]
public virtual bool OpenInNewTab
{
    get => GetAttribute((v) => bool.Parse(v));
    set => SetAttribute(value, (v) => v.ToString());
}

However, this property appears to reset to it's unchecked state after the block/page has been published.

See demo: screen-capture.webm

Please let me know if the code above is wrong or if this is a genuine bug.

Cheers!