Dynamics list columns with a lot of work ahead
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { Route, Routes } from "react-router";
|
||||
import { useTranslation } from "@refinedev/core";
|
||||
import List from "./base-page/List";
|
||||
import Edit from "./base-page/Edit";
|
||||
import New from "./base-page/New";
|
||||
@@ -22,12 +21,12 @@ export const EntityRoutes = () => {
|
||||
}
|
||||
|
||||
const ListEntity = () => {
|
||||
const { translate: t } = useTranslation();
|
||||
const columns = [
|
||||
{ field: "entity_data", headerName: t("schemas.type"), width: 110, valueFormatter: ({ type }: {type: string}) => type },
|
||||
{ field: "label", headerName: t("schemas.label"), flex: 1 },
|
||||
{ field: "entity_data.type", column: { width: 110 }},
|
||||
{ field: "label", column: { flex: 1 }},
|
||||
{ field: "updated_at", column: { flex: 1 }},
|
||||
];
|
||||
return <List<Entity> resource={`entities`} columns={columns} />
|
||||
return <List<Entity> resource={`entities`} schemaName={"Entity"} columns={columns} />
|
||||
}
|
||||
|
||||
const EditEntity = () => {
|
||||
|
||||
Reference in New Issue
Block a user