I have created a custom module that uses the UI component
<uiComponent name="product_listing"/>
Basically, I want to create a javascript file in my module that rewrites/overrides only the fallowing part of that component js file:
vendor/magento/module-ui/view/base/web/js/grid/provider.js:
/**
* Reloads data with current parameters.
*/
reload: function () {
this.trigger('reload');
if (this.request && this.request.readyState !== 4) {
this.request.abort();
}
console.log(this);
this.request = $.ajax({
url: this['update_url'],
method: 'GET',
data: this.get('params'),
dataType: 'json'
});
this.request
.done(this.onReload)
.error(this.onError);
},
Can someone please guide me trough how to do that in the best and efficient way ? Thank you!