On the new product management experience page. When creating a new shipping class, the onCancel event gets called whenever the AddNewShippingClassModal is closed. We should modify the AddNewShippingClassModal method to accept both onRequestClose and onCancel props.

That way, consumers of that modal can specifically handle when the Cancel button is explicitly clicked. And we would be able to add tracks events for both.

Additional context

To see this go to Products > New Product (MVP) > Shipping Click the selector under Shipping class and select New shipping class. The onClose and onCancel call the same event.

© 2022 pullanswer.com - All rights reserved.