How to get relational data?
import { useResourceParams, useTable } from "@refinedev/core";
import { Card, Table } from "antd";
import React from "react";
import { useParams } from "react-router-dom";
export const CompanyContactsTable = () => {
const params = useParams();
const { tableProps } = useTable({
resource: "contacts",
});
return (
<Card title="contacts">
<Table {...tableProps} rowKey="id">
<Table.Column title="name" dataIndex="name" />
</Table>
</Card>
);
};
how can i get the conacts details when a user clicks on a company from the company page?
import { Card, Table } from "antd";
import React from "react";
import { useParams } from "react-router-dom";
export const CompanyContactsTable = () => {
const params = useParams();
const { tableProps } = useTable({
resource: "contacts",
});
return (
<Card title="contacts">
<Table {...tableProps} rowKey="id">
<Table.Column title="name" dataIndex="name" />
</Table>
</Card>
);
};
how can i get the conacts details when a user clicks on a company from the company page?
