Skip to content

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

Fix product type select

dominik-zeglena857601328cd
diff --git a/saleor/static/dashboard-next/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx b/saleor/static/dashboard-next/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx
index df752a95ee..ff57834da8 100644
--- a/saleor/static/dashboard-next/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx
+++ b/saleor/static/dashboard-next/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx
@@ -79,7 +79,6 @@ const styles = (theme: Theme) =>
export interface MultiAutocompleteSelectFieldProps {
allowCustomValues?: boolean;
displayValues: MultiAutocompleteChoiceType[];
- emptyOption?: boolean;
name: string;
choices: MultiAutocompleteChoiceType[];
value: string[];
@@ -103,7 +102,6 @@ export const MultiAutocompleteSelectFieldComponent = withStyles(styles, {
choices,
classes,
displayValues,
- emptyOption,
helperText,
label,
loading,
@@ -169,19 +167,6 @@ export const MultiAutocompleteSelectFieldComponent = withStyles(styles, {
displayValues.length > 0 ||
allowCustomValues ? (
<>
- {emptyOption && (
- <MenuItem
- component="div"
- {...getItemProps({
- item: ""
- })}
- >
- <Checkbox checked={false} disabled disableRipple />
- <Typography color="textSecondary">
- {i18n.t("None")}
- </Typography>
- </MenuItem>
- )}
{displayValues.map(value => (
<MenuItem
key={value.value}
diff --git a/saleor/static/dashboard-next/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx b/saleor/static/dashboard-next/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx
index c6f858b32a..1b4523e3e6 100644
--- a/saleor/static/dashboard-next/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx
+++ b/saleor/static/dashboard-next/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx
@@ -175,7 +175,7 @@ const SingleAutocompleteSelectFieldComponent = withStyles(styles, {
</MenuItem>
)}
{choices.map((suggestion, index) => {
- const choiceIndex = emptyOption ? index + 1 : 0;
+ const choiceIndex = index + (emptyOption ? 1 : 0);
return (
<MenuItem