class Table extends React.Component { constructor(props){ super(props); this.title = props.title; this.height = props.height; this.ajaxUrl = "./insp.ajax.php"; } componentDidMount() { const tableData = [ {id: 1, name: "John", age: 29}, {id: 2, name: "Jane", age: 34}, {id: 3, name: "Smith", age: 23} ]; const table = new Tabulator(this.tableRef, { data: tableData, layout: "fitColumns", columns: [ {title: "ID", field: "id", width: 150}, {title: "Name", field: "name"}, {title: "Age", field: "age"} ] }); } render() { return ( <>
{this.title}