import { FC } from "react"; import { Skeleton } from "../ui/skeleton"; import { OnRowClick } from "./utils/type"; import { Sticker } from "lucide-react"; export const TLList: FC<{ local: Record & { el: null | HTMLDivElement; render: () => void; }; data: any[]; PassProp: any; row_click: OnRowClick; mode_child: any; dataGridStyle: (local: { el: null | HTMLDivElement }) => string; }> = ({ local, data, dataGridStyle, mode_child, PassProp, row_click }) => { return (
{ if (!local.el && el) { local.el = el; } }} > {local.status !== "ready" ? (
) : (
<> {Array.isArray(data) && data.length > 0 ? (
{ local.grid_ref = e; }} onScroll={(e) => local.paging.scroll(e.currentTarget)} > {data.map((e, idx) => { return (
{ if (!isEditor && typeof row_click === "function") { row_click({ event: ev, idx: idx, row: e, rows: local.data, }); } }} > {mode_child}
); })}
) : (
No Data
{local.filtering && (
{local.filtering}
)}
)}
)}
); };