Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom boolean value resets when published #30

Open
alex-finnigan-mando opened this issue Jul 8, 2024 · 0 comments
Open

Custom boolean value resets when published #30

alex-finnigan-mando opened this issue Jul 8, 2024 · 0 comments

Comments

@alex-finnigan-mando
Copy link

alex-finnigan-mando commented Jul 8, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant