I'm trying to override Magento_Checkout/js/sidebar.js
_initContent
method. I need to delete two events from it and create my own events instead. Is it possible without copying the full method from the original sidebar.js
? I created mixin and I can call the original method by this._super()
but I don't know how I can access events array in my mixin. Thanks in advance.
Add a comment
|
1 Answer
Unfortunately you can't do that without copying the code from parent. If you call this._super() then ofz you will execute whole logic of parent method. Another thing is the _initContent is marked as @private and therefore should be not extended. The best way here will be to implement your own logic either with usage of mixin or with require-config.js map override.