我在react中集成了材料表(参考:https://material-table.com/)。
我想导出显示的数据(所有数据和搜索结果)到PDF使用jspdf。无法在材料表中获取该信息。
不幸的是,我无法获得所有数据以及搜索到的数据。
有人能帮上忙吗?
发布于 2021-02-04 01:30:16
尝试从react执行useRef()。
import {useRef} from "react";
const YourComponent = () => {
const tableRef = useRef();
console.log(tableRef.current.dataManager.data); // check proper field
return <MaterialTable tableRef={tableRef} {...restProps} />;
}https://stackoverflow.com/questions/57708036
复制相似问题