Hi,
Today first time I’m trying to use Handsontable with Laravel. Just started with basic tables and generated data with loops. Everything working till 2014 row. If I get 2015 row, the table not even loading. But I need to loop over 50,000 rows. Is it right approach to load all data at once or you suggest any different ways?
This is my configuration. (In the same page, not in a separate page since I want to use loops with Laravel blade).
var
objectData = [
@foreach($reports as $report)
{
inspection_number: '{{$report-inspection_number}}',
identification_of_inspection: '{{$report-identification_of_inspection}}',
date: '{{\Carbon\Carbon::parse($report-request_or_planned_date)-format('d/m/Y')}}',
first_name: '{{$report-employee-first_name ?? ''}}',
last_name: '{{$report-employee-last_name ?? ''}}',
place: '{{$report-place-place_code ?? ''}}',
type_of_inspection: '{{$report-type_of_inspection ?? ''}}',
department: '{{$report-employee-department-name ?? ''}}',
},
@endforeach
],
container = document.getElementById('example6'),
hot6;
hot6 = new Handsontable(container, {
data: objectData,
height: 750,
dropdownMenu: true,
rowHeaders: true,
filters: true,
colHeaders: ['Inspection Number', 'Identification of Inspection', 'Request or Planned Date', 'Name', 'Last Name', 'Place', 'Type of Inspection','Department'],
columnSorting: true,
columns: [
{data: 'inspection_number'},
{data: 'identification_of_inspection', type: 'text'},
{data: 'date', type: 'date'},
{data: 'first_name'},
{data: 'last_name'},
{data: 'place'},
{data: 'type_of_inspection'},
{data: 'department'},
],
minSpareRows: 0
});
PS. I forgot to write, if I reduce the loop columns to 2, it loads all over 50k row but with the columns I desired to list, not woking as I mentioned.