Skip to content
Snippets Groups Projects
Commit c13c029edf85 authored by Frank Bessou's avatar Frank Bessou :spider_web:
Browse files

feat: Add country attribute to City

It defaults to "France".
parent d7a1e5300ba6
No related branches found
No related tags found
1 merge request!15Topic/default/default values
...@@ -109,6 +109,7 @@ ...@@ -109,6 +109,7 @@
<TextField source="id" /> <TextField source="id" />
<TextField source="name" /> <TextField source="name" />
<NumberField source="zip_code" /> <NumberField source="zip_code" />
<TextField source="country" />
</Datagrid> </Datagrid>
</List> </List>
); );
...@@ -119,6 +120,7 @@ ...@@ -119,6 +120,7 @@
<TextField source="id" /> <TextField source="id" />
<TextField source="name" /> <TextField source="name" />
<NumberField source="zip_code" /> <NumberField source="zip_code" />
<TextField source="country" />
<ReferenceArrayField <ReferenceArrayField
label="Museum" label="Museum"
reference="Museum" reference="Museum"
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
City: { City: {
name: { type: "String", required: true }, name: { type: "String", required: true },
zip_code: { type: "Int" }, zip_code: { type: "Int" },
country: { type: "String", default: "France" },
}, },
Person: { Person: {
name: { type: "String" }, name: { type: "String" },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment