appendTo usage in dataTable

UI Components for React
Post Reply
sKondoR
Posts: 1
Joined: 28 Dec 2017, 11:10

07 Jan 2018, 13:34

Hi,

I have an error while using appendTo in filter components in dataTable (the same error for appendTo in Multiselect component in table filters)
"Uncaught (in promise) TypeError: Failed to execute 'removeChild' on 'Node': parameter 1 is not of type 'Node'.
at removeChild (DOMChildrenOperations.js:65)
at Object.processUpdates ( ..."

could you show an appendTo example?

primereact 1.3.0
react 15.5.4
my code:

let filterRange = <div className="ui-column-filter-block">
<Calendar
...
appendTo={document.body}
></Calendar>
</div>;

let columns = this.state.cols.map((col,i) => {
if(col.field === 'createdDate') return <Column key={col.field} field="createdDate" header="Created Date" style={{width:'200px'}} sortable={true} filter={true} filterElement={filterRange} body={this.dateTemplate}/>
});

return (
<div className="file-explorer-page">
<DataTable
header={headerToggle} tableClassName="ui-datatable-lined"
value={this.state.rows}
scrollable={true} scrollHeight="600px" style={{width: '100%'}}
frozenWidth="250px" unfrozenWidth="calc(100% - 250px)"
paginator={true} paginatorLeft={paginatorLeft} paginatorRight={paginatorRight} rows={10} rowsPerPageOptions={[5,10,20]}
>
<Column field="name" header="Name" style={{width:'250px'}} frozen={true} sortable={true} filter={true} filterPlaceholder="Search..." filterClass="form-control input-sm" />
{columns}
<Column />
<Column field="downloadUrl" header="" style={{width:'50px'}} body={this.downloadUrlTemplate} filter={true} filterClass="form-control input-sm unvisible" />
</DataTable>
</div>

merve7
Posts: 861
Joined: 12 Sep 2017, 10:44

08 Jan 2018, 14:40

You can see filter example with MultiSelect in source (http://primefaces.org/primereact/#/datatable/filter)
And to help us replicate, please create a plunker (https://plnkr.co/edit/uHHN7wKskRgpHszbPZtj?p=preview)

Post Reply

Return to “PrimeReact”

  • Information