4

In Magento 2 admin grid system, the one that uses ui-components, while the content of the grid is loading there is a spinner over the grid content.
spinner.

When the grid is loaded, the spinner goes away. no-spinner

What's the code js that makes it disappear when the grid contents are loaded?

  • magento\vendor\magento\module-ui\view\base\ui_component\templates\listing\default.xhtml & Example magento\vendor\magento\module-cms\view\adminhtml\ui_component\cms_block_listing.xml file's <item name="spinner" xsi:type="string">cms_block_columns</item> – Ankit Shah May 8 '17 at 6:53
  • Your comment makes me realize I may have worded my question wrongly. I know how to add a spinner to the grid. I'm curious on the JS code that makes it go away when the grid finishes loading. – Marius May 8 '17 at 6:55
2

magento\vendor\magento\module-ui\view\base\web\js\grid\listing.js

/**
 * Handler of the data providers' 'reloaded' event.
 */
onDataReloaded: function () {
    resolver(this.hideLoader, this);
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.