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?

2
  • 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>
    – Jackson
    Commented May 8, 2017 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
    Commented May 8, 2017 at 6:55

1 Answer 1

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);
}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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