Skip to content

Field View PropertyValue always a string #145

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

Open
jhershey-marceldigital opened this issue Apr 7, 2025 · 0 comments
Open

Field View PropertyValue always a string #145

jhershey-marceldigital opened this issue Apr 7, 2025 · 0 comments
Labels
bug Something isn't working state/sprint-candidate

Comments

@jhershey-marceldigital
Copy link

jhershey-marceldigital commented Apr 7, 2025

Describe the bug
The PropertyValue field of the FieldViewContext model is always a string. I expect to be able to use pattern matching/casting to get the typed value, or for documentation (here) to indicate that PropertyValue will come through as a string.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Add non-string fields to a List View configuration and invoke SetView.
collectionConfiguration.ListView(listViewConfig => {
    // field type is DateTimeOffset
    listViewConfig.AddField(x => x.StartEffectiveDate).SetHeading("#agencyProduct_startEffectiveDate").SetView("DateOnly");
    // field type is a custom entity, "Role"
    listViewConfig.AddField(x => x.Role).SetHeading("#agencyProduct_role").SetView("AgencyRole");
});
  1. Invoke GetType() on the PropertyValue field within a custom Field View/

Image

Environment (please complete the following information):

  • Server OS: Windows
  • Browser: Chrome
  • Umbraco Version: 15.3.0
  • Product Version: 15.1.2

This item has been added to our backlog AB#51757

@jhershey-marceldigital jhershey-marceldigital added the bug Something isn't working label Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working state/sprint-candidate
Projects
None yet
Development

No branches or pull requests

2 participants