iteria-app / lowcode

React Lowcode - prototype, develop and maintain internal apps easier

Home Page:https://iteria.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Basic Material UI table should have `<FormattedMessage` too

jozef-slezak opened this issue · comments

  • Instead of <TableCell>avatarUrl</TableCell> it should by <FormattedMessage "customer.avatarUrl"....`
  • templates for <FormattedMessage / intl. hooks
import { Table, TableHead, TableRow, TableCell, TableBody } from "@material-ui/core";
export default function CustomerTable({ customers }) {
    return <Table><TableHead>
        <TableRow><TableCell>avatarUrl</TableCell><TableCell>createdAt</TableCell>
        <TableCell>email</TableCell><TableCell>id</TableCell><TableCell>name</TableCell><TableCell>phone</TableCell><TableCell>updatedAt</TableCell></TableRow></TableHead>
        <TableBody>{customers.map(customer => <TableRow><TableCell>{customer.avatarUrl}</TableCell><TableCell>{customer.createdAt}</TableCell><TableCell>{customer.email}</TableCell><TableCell>{customer.id}</TableCell><TableCell>{customer.name}</TableCell><TableCell>{customer.phone}</TableCell><TableCell>{customer.updatedAt}</TableCell></TableRow>)}</TableBody>
        </Table>;
}

@mat-app, maybe we just need to configure react intl formatter

getHeaderTitleJsxText(entity: Entity, property: Property): ts.JsxText | ts.JsxSelfClosingElement{
from the facade?