Rate this post
Here are the actions you will adhere to within this How to rewrite (custom) javascript:
  • I will create a requirejs.js file in app/code/[Namspace]/[Module_Name]/view/adminhtml/web/js/requirejs.js
  • Create file grid.js in app/code/[Namspace]/[Module_Name]/view/adminhtml/web/js/grid.js
  • Final step to custom Magento 2 javascript

What if I want to rewrite file mage/adminhtml/grid.js in Magento core?  You may want to check it through Magento 2 Demo first.
Well, I will show you how to rewrite it with Magento 2 javascript – Magento 2.3.

1 I will create a requirejs.js file in app/code/[Namspace]/[Module_Name]/view/adminhtml/web/js/requirejs.js
2 Create file grid.js in app/code/[Namspace]/[Module_Name]/view/adminhtml/web/js/grid.js
3 final step to custom Magento 2 javascript

Step 1:

I will create a requirejs.js file in app/code/[Namspace]/[Module_Name]/view/adminhtml/web/js/requirejs.js

 

Step 2:

  • Create file grid.js in app/code/[Namspace]/[Module_Name]/view/adminhtml/web/js/grid.js
  • Content of this file will use custom (rewrite) javascript of grid.js file of Magento core

Step 3 – final step to custom Magento 2 javascript:

Please include file requirejs.js in header of the action that you want to rewrite grid.js file

Your Magento website needs a powerful Magento ERP for stock control.

DON'T MISS THE CHANCE!

magento erp

How to Disable Requirejs Cache in Magento 2 - Magento 2.3
Magento 2 Tutorial: How to Write a Page Using Knockout Js? - Magento 2.3
Tagged:

Leave a Reply

Your email address will not be published. Required fields are marked *