react-data-table-component-extensions icon indicating copy to clipboard operation
react-data-table-component-extensions copied to clipboard

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

Open NahidAhmed07 opened this issue 2 years ago • 4 comments

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)

NahidAhmed07 avatar Jun 28 '22 11:06 NahidAhmed07

I Have the same Issue

eddylackmann avatar Jun 29 '22 15:06 eddylackmann

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

AbnerLR-iSoft avatar Jul 07 '22 19:07 AbnerLR-iSoft

I Have the same Issue

davilatk avatar Jan 20 '23 18:01 davilatk

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, }, ];

SaqibJamil7866 avatar Jun 26 '24 07:06 SaqibJamil7866