sp-dev-fx-controls-react
sp-dev-fx-controls-react copied to clipboard
ListView: _flattenItem strips out Date fields
Category
[ ] Enhancement [X] Bug [ ] Question
Version
Please specify what version of the library you are using: [1.11.0]
Expected / Desired Behavior / Question
I'd like to be able to pass JavaScript Date fields into ListView and provide a render function for them (generally .toLocaleDateString()).
Observed Behavior
If I pass in an array of items which have JavaScript Date fields, they are stripped out of the objects in the _flattenItem function.
Steps to Reproduce
Pass an array of items into the function which has JavaScript Date fields. They will not be available for rendering. There won't be any error, but the value will not be available in the render function for the IViewField.
I haven't had the time to stop and think what the benefit is of the _flattenItem function is, but my immediate desire is to be able to skip it via a prop!
I have quite a serious issue too https://github.com/SharePoint/sp-dev-fx-controls-react/issues/223
Unfortunately private fields are not yet a reality (support or production ready) so I'm a bit stuck with my issue
Just fell in the exact same issue!
This issue points out same issue as #189