Enforce category selection in product creator (#1337) (#1354)

Co-authored-by: SektorDV <35644259+SektorDV@users.noreply.github.com>
This commit is contained in:
Jakub Majorek 2021-09-03 13:40:06 +02:00 committed by GitHub
parent 8ef3c06efe
commit 9b2f5e3db2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -174,7 +174,6 @@ function useProductCreateForm(
trackInventory: false,
weight: ""
};
const [changed, setChanged] = React.useState(false);
const triggerChange = () => setChanged(true);
@ -312,7 +311,8 @@ function useProductCreateForm(
data.channelListings.some(
channel =>
validatePrice(channel.price) || validateCostPrice(channel.costPrice)
));
) ||
!data.category);
return {
change: handleChange,