When I try to render custom element using cell render,
here is my component: Action.jsx
import React from 'react';
export default (props) => (
<div>
<button
class="action-button cancel">
cancel
</button>
</div>
);
here are my grid options and import:
import AcRenderer from './Action.jsx'
...
const gridOptions = {
rowData: renderdata(),
columnDefs: [
{
headerName: "action",
cellRenderer: AcRenderer,
editable: false,
colId: "action",
filter: false,
minWidth: 220
}
],
but I keep getting this error:
"Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.
"
Does anyone know why?
with many thanks!!