react class ajax warning 300 DataTables warning: table id=DataTables_Table_0 - Cannot reinitialise

react class ajax warning 300 DataTables warning: table id=DataTables_Table_0 - Cannot reinitialise

lsflsf Posts: 1Questions: 1Answers: 0

Link to test case:
Debugger code (debug.datatables.net): class Table extends Component {
//cdn.datatables.net/plug-ins/1.11.5/i18n
componentDidMount() {
console.log(this.el)
this.$el = $(this.el)
this.$el.DataTable({
ajax: 'http://127.0.0.1:5000/api/data',

serverSide: true,
columns: [

  {title:'Name',data: 'Name'},
  {title:'Heating Area',data: 'Heat_area'},
  {title:'Primary Supply Temperature',data: 'P_T_S'},
  {title:'Primary Return Temperature',data: 'P_T_R',},
  {title:'Time11',data: 'timestamps', orderable: false}
],

});};

render() {
return (

this.el = el}>

);
}
}
Error messages shown: DataTables warning: table id=DataTables_Table_0 - Cannot reinitialise DataTable. For more information about this error, please see http://datatables.net/tn/3
Description of problem: looks like call two times ajax.

Answers

Sign In or Register to comment.