GridDataProvider component
The GridDataProvider UI component is a data provider for the Listing component. It provides data in specific format which is shared among all UI components in the scope of the Listing component.
Options
Option
Description
Type
Default Value
classPath to the PHP class responsible for the backend implementation of the component
String
Magento\Framework\View\Element\UiComponent\DataProvider\DataProvidercomponentThe path to the component's
.js file, relative to RequireJS.String
Magento_Ui/js/grid/providerfirstLoadDefines the first loading of data. The value changes to
false if data reloads.Boolean
truelastErrorDefines if an error occurred for the latest data reloading.
Boolean
falsestorageConfigConfiguration of the GridDataStorage component.
Object
{component: 'Magento_Ui/js/grid/data-storage',provider: '${ $.storageConfig.name }',name: '${ $.name }_storage',updateUrl: '${ $.update_url }'}Sources files
Extends UiElement:
Examples
Integration
This is an example of how the GridDataProvider component integrates with the Listing component:
<listing>
<dataSource name="listing_data_source" component="Magento_Ui/js/grid/provider">
<settings>
<storageConfig>
<param name="indexField" xsi:type="string">entity_id</param>
</storageConfig>
<updateUrl path="mui/index/render"/>
</settings>
<aclResource>Vendor_Module::resource</aclResource>
<dataProvider class="Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider" name="listing_data_source">
<settings>
<requestFieldName>id</requestFieldName>
<primaryFieldName>entity_id</primaryFieldName>
</settings>
</dataProvider>
</dataSource>
...
</listing>