diff --git a/examples/getstarted/components/default/dish.json b/examples/getstarted/components/default/dish.json index 3c2655de90..dde5c76ff7 100755 --- a/examples/getstarted/components/default/dish.json +++ b/examples/getstarted/components/default/dish.json @@ -7,7 +7,8 @@ "collectionName": "components_dishes", "attributes": { "name": { - "type": "string" + "type": "string", + "required": true }, "description": { "type": "text" diff --git a/packages/strapi-plugin-content-manager/admin/src/components/Inputs/index.js b/packages/strapi-plugin-content-manager/admin/src/components/Inputs/index.js index 7d9c7bc14b..779fe47d51 100644 --- a/packages/strapi-plugin-content-manager/admin/src/components/Inputs/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/Inputs/index.js @@ -7,6 +7,7 @@ import { Inputs as InputsIndex } from '@buffetjs/custom'; import useDataManager from '../../hooks/useDataManager'; import InputJSONWithErrors from '../InputJSONWithErrors'; +import SelectWrapper from '../SelectWrapper'; import WysiwygWithErrors from '../WysiwygWithErrors'; const getInputType = (type = '') => { @@ -99,6 +100,21 @@ function Inputs({ autoFocus, keys, layout, name, onBlur }) { // TODO format error for the JSON, the WYSIWYG and also the file inputs // TODO check if the height for the textarea is 196px (not mandatory) + if (type === 'relation') { + return ( +