Skip to content

Changing quantity to 0 while creating and Offer Draft entirely removes the product.Β #4162

@HouseinIsProgramming

Description

@HouseinIsProgramming

Describe the bug

In the Create draft offer page, while adding products, setting the quantity to 0 or deleting the value removes the product.

I also expect Enter while changing the quantity to "submit the value", right now it does nothing and the value gets updated anytime it's changed and the user is notified with a toast.

When setting the value to, for example, 1000, the user would see 3 toasts, "order line updated" toasts, 1 for every key stroke.

To Reproduce

  1. Go to the dashboard
  2. navigate to Sales > Orders and click on "+ Draft order"
  3. Add a product and try to change the value, then set it to 0.
  4. Product is removed.

Expected behavior
Product is not removed, and the value can be null, and a proper placeholder is shown, and only when pressing enter while the value is null, would the product be removed.

Actual behavior
Product is removed.

Screenshots/Videos

Image

Minimal reproduction
Any vendure installation/dev server

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions