Disable next step when no value selected in variant selector (#1218)
* Disable next step when no value selected in variant selector * Update changelog * Update test snapshots
This commit is contained in:
parent
8d45454f84
commit
51dba9f43b
3 changed files with 6 additions and 5 deletions
|
@ -61,6 +61,7 @@ All notable, unreleased changes to this project will be documented in this file.
|
||||||
- Fix forbidden null sending as attribute value - #1201 by @orzechdev
|
- Fix forbidden null sending as attribute value - #1201 by @orzechdev
|
||||||
- Fix huge payload issue for plugins view - #1203 by @kamilpastuszka
|
- Fix huge payload issue for plugins view - #1203 by @kamilpastuszka
|
||||||
- Fix missing call for update metadata mutation - #1207 by @orzechdev
|
- Fix missing call for update metadata mutation - #1207 by @orzechdev
|
||||||
|
- Disable next step when no value selected in variant selector - #1218 by @orzechdev
|
||||||
- Fix order links on home page - #1219 by @jwm0
|
- Fix order links on home page - #1219 by @jwm0
|
||||||
- Fix huge payload issue for plugins view - #1203 by @kamilpastuszka
|
- Fix huge payload issue for plugins view - #1203 by @kamilpastuszka
|
||||||
|
|
||||||
|
|
|
@ -55,9 +55,8 @@ function canHitNext(
|
||||||
switch (step) {
|
switch (step) {
|
||||||
case ProductVariantCreatorStep.values:
|
case ProductVariantCreatorStep.values:
|
||||||
return (
|
return (
|
||||||
(data.attributes.every(attribute => attribute.values.length > 0) &&
|
data.attributes.every(attribute => attribute.values.length > 0) &&
|
||||||
variantsLeft === null) ||
|
(variantsLeft === null || getVariantsNumber(data) <= variantsLeft)
|
||||||
getVariantsNumber(data) <= variantsLeft
|
|
||||||
);
|
);
|
||||||
case ProductVariantCreatorStep.prices:
|
case ProductVariantCreatorStep.prices:
|
||||||
if (data.price.mode === "all") {
|
if (data.price.mode === "all") {
|
||||||
|
|
|
@ -180147,9 +180147,10 @@ exports[`Storyshots Views / Products / Create multiple variants interactive 1`]
|
||||||
class="PageHeader-root-id"
|
class="PageHeader-root-id"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-contained-id ProductVariantCreatePage-button-id MuiButton-containedPrimary-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-contained-id ProductVariantCreatePage-button-id MuiButton-containedPrimary-id MuiButton-disabled-id MuiButtonBase-disabled-id"
|
||||||
data-test-id="next-step"
|
data-test-id="next-step"
|
||||||
tabindex="0"
|
disabled=""
|
||||||
|
tabindex="-1"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
|
|
Loading…
Reference in a new issue