Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Display type error

dominik-zeglen854ccaab4208
diff --git a/saleor/static/dashboard-next/navigation/components/MenuItemDialog/MenuItemDialog.tsx b/saleor/static/dashboard-next/navigation/components/MenuItemDialog/MenuItemDialog.tsx
index 064f210ccc..4ebda487a8 100644
--- a/saleor/static/dashboard-next/navigation/components/MenuItemDialog/MenuItemDialog.tsx
+++ b/saleor/static/dashboard-next/navigation/components/MenuItemDialog/MenuItemDialog.tsx
@@ -202,6 +202,10 @@ const MenuItemDialog: React.StatelessComponent<MenuItemDialogProps> = ({
const handleSubmit = () => onSubmit(data);
+ const idError = ["category", "collection", "page", "url"]
+ .map(field => getFieldError(errors, field))
+ .reduce((acc, err) => acc || err);
+
return (
<Dialog
onClose={onClose}
@@ -238,12 +242,12 @@ const MenuItemDialog: React.StatelessComponent<MenuItemDialogProps> = ({
disabled={disabled}
onChange={handleSelectChange}
name="id"
- helperText=""
label={i18n.t("Link")}
displayValue={displayValue}
loading={loading}
- error={false}
options={options}
+ error={!!idError}
+ helperText={idError}
placeholder={i18n.t("Start typing to begin search...")}
onInputChange={handleQueryChange}
/>