Material-table: Filter and Export do not use field accessor for complex data

Created on 31 Mar 2019  路  4Comments  路  Source: mbrn/material-table

Describe the bug

If I have a complex object as below, the data is properly displayed, but export do CSV and filtering do not work as it doesn't use byString() accessor:

const data = [
{"name": {"first": "Hello", "last": "World"}},
];
const columns = [
{"field": "name.first", "title": "First Name"},
];

Expected behavior
All access should be the same.

bug

All 4 comments

Hi @barbieri

I will take a look at it asap. If you need a quick workaround you can override exportCsv feature to solve your problem.

no hurry, I was just investigating... the actual project will use flat data structure, so won't be affected.

@mbrn thanks for the tip about the workaround. :)

This is done with version 1.31.0

Was this page helpful?
0 / 5 - 0 ratings