Magento2 admin in we use UI components for create form and grid. UI components are create using Knockout JS and its little harder to debug UI component in Magento2. In this blog we will see how to debug UI component in browser console.
If you want to see list of component used in page then run below code in you browser console.
var currentUiComponents = {};
requirejs('uiRegistry').filter(function(item){
currentUiComponents[item.name] = item;
});
console.log(currentUiComponents);
Output like below.
We can see specific component in details. Here is some basic code example to see customer firstname in console of customer edit page in admin.
require('uiRegistry').get('customer_form.customer_form_data_source').data.customer.firstname;
require('uiRegistry').get('customer_form.customer_form_data_source');
Output like below.
We can use chrome extension for debug Knockout components.
I hope this blog is useful to debug UI component in Magento2. In case, I missed anything or need to add some more information, Don’t heisted to leave a comment in this blog, I’ll get back with some positive approach.
Keep loving ❤️ Keep inspiring 🤩 Keep liking 👍 No sharing 😂
5 Comments
I like this weblog very much, Its a very nice post to read and receive information. “A little in one’s own pocket is better than much in another man’s purse.” by Miguel de Cervantes.
Bwer Company is a top supplier of weighbridge truck scales in Iraq, providing a complete range of solutions for accurate vehicle load measurement. Their services cover every aspect of truck scales, from truck scale installation and maintenance to calibration and repair. Bwer Company offers commercial truck scales, industrial truck scales, and axle weighbridge systems, tailored to meet the demands of heavy-duty applications. Bwer Company’s electronic truck scales and digital truck scales incorporate advanced technology, ensuring precise and reliable measurements. Their heavy-duty truck scales are engineered for rugged environments, making them suitable for industries such as logistics, agriculture, and construction. Whether you’re looking for truck scales for sale, rental, or lease, Bwer Company provides flexible options to match your needs, including truck scale parts, accessories, and software for enhanced performance. As trusted truck scale manufacturers, Bwer Company offers certified truck scale calibration services, ensuring compliance with industry standards. Their services include truck scale inspection, certification, and repair services, supporting the long-term reliability of your truck scale systems. With a team of experts, Bwer Company ensures seamless truck scale installation and maintenance, keeping your operations running smoothly. For more information on truck scale prices, installation costs, or to learn about their range of weighbridge truck scales and other products, visit Bwer Company’s website at bwerpipes.com.
At BWER Company, we prioritize quality and precision, delivering high-performance weighbridge systems to meet the diverse needs of Iraq’s industries.
Trusted by Iraq’s top industries, BWER Company provides innovative weighbridge systems, enabling seamless load monitoring and weight compliance for transport, construction, and agriculture sectors.
Definitely believe that that you stated. Your favourite reason appeared to be on the net the simplest factor to take note of. I say to you, I certainly get annoyed even as folks consider issues that they plainly don’t know about. You controlled to hit the nail upon the highest and also outlined out the whole thing with no need side effect , folks can take a signal. Will probably be again to get more. Thank you