Skip to content
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

Uncaught Error: selector must be a . delimted string eg (my.property) #40

Open
NahidAhmed07 opened this issue Jun 28, 2022 · 4 comments

Comments

@NahidAhmed07
Copy link

When I trying to export or print a document throw this error on console .
Uncaught Error: selector must be a . delimted string eg (my.property)
at getProperty (utilities.js:61:1)
at utilities.js:106:1
at Array.forEach ()
at utilities.js:93:1
at Array.forEach ()
at Object.dataRender (utilities.js:91:1)
at DataTableExtensions.onDataRender (index.js:116:1)
at DataTableExtensions.onPrint (index.js:165:1)
at Object.onClick (index.js:227:1)
at onClick (ui.js:85:1)

@eddylackmann
Copy link

I Have the same Issue

@AbnerLR-iSoft
Copy link

AbnerLR-iSoft commented Jul 7, 2022

I have to react-data-table-component version = "^7.5.2" and "react-data-table-component-extensions": "^1.6.0"

This happened to me when i want to export, and i solved to problem like this

columns = [
{ name: 'Folio', selector: row => row.Cfdi_Folio, cellExport: row => row.Cfdi_Folio, sortable: true },
...
]

You must have this format in selector (selector: row => row.title ) Add to cellExport if you want to export

i followed to documentation

https://www.npmjs.com/package/@innenpkg/react-data-table-component-extensions

image

@davilatk
Copy link

I Have the same Issue

@SaqibJamil7866
Copy link

You have to define cellExport function in columns array.

const columns = [
{
id: "id",
name: "ID",
selector: (row) => row.id,
cellExport: (row) => row.id,
sortable: true,
},
{
id: "title",
name: "Title",
selector: (row) => row.title,
cellExport: (row) => row.title,
sortable: true,
},
{
id: "year",
name: "Year",
selector: (row) => row.year,
cellExport: (row) => row.year,
sortable: true,
},
];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants