Open
Description
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:
- 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");
});
- Invoke
GetType()
on thePropertyValue
field within a custom Field View/
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