I'd like export all data from a lazy loaded PrimeReact DataTable to CSV file. I can export one page to file but not all data from all page.
const dt = useRef<any>(null);
const exportCSV = (selectionOnly: boolean) => {
dt.current.exportCSV({ selectionOnly });
};
const header = (
<div className="flex align-items-center justify-content-end gap-2">
<Button type="button" icon="pi pi-file" rounded onClick={() => exportCSV(false)} data-pr-tooltip="CSV" />
</div>
);
<DataTable value={channelsValues}
ref={dt}
header={header}
...
Please help me.