(demo) improve create form submit

Take in account more fields. Use a form instead a ref to retrieve values
 easily.
This commit is contained in:
jbpenrath
2024-02-14 00:41:41 +01:00
committed by Jean-Baptiste PENRATH
parent 7320671589
commit cd476ae82b
2 changed files with 41 additions and 17 deletions

View File

@@ -83,8 +83,13 @@ export const Home = ({ changePage }: PageProps) => {
headerName: "Name",
},
{
field: "sex",
id: "sex",
headerName: "Sex",
renderCell: (params) => {
return (
<span className="material-icons">{params.row.sex}</span>
);
},
},
{
id: "birthDate",
@@ -104,7 +109,13 @@ export const Home = ({ changePage }: PageProps) => {
id: "isGuest",
headerName: "Is Guest",
renderCell: (params) => {
return params.row.isGuest ? "yes" : "no";
return params.row.isGuest ? (
<span className="material-icons ml-s">check_box</span>
) : (
<span className="material-icons ml-s">
check_box_outline_blank
</span>
);
},
},
{