sp-dev-fx-controls-react icon indicating copy to clipboard operation
sp-dev-fx-controls-react copied to clipboard

ListView: _flattenItem strips out Date fields

Open sympmarc opened this issue 6 years ago • 3 comments

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.

sympmarc avatar Jan 21 '19 14:01 sympmarc

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

semopz avatar Jan 22 '19 10:01 semopz

Just fell in the exact same issue!

PzKfWg avatar Mar 01 '19 15:03 PzKfWg

This issue points out same issue as #189

michaelmaillot avatar Sep 13 '23 17:09 michaelmaillot