Edit in GitHubLog an issue
Thanks to Atwix for contributing this topic!

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

OptionDescriptionTypeDefault Value
class
Path to the PHP class responsible for the backend implementation of the component
String
Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider
component
The path to the component's .js file, relative to RequireJS.
String
Magento_Ui/js/grid/provider
firstLoad
Defines the first loading of data. The value changes to false if data reloads.
Boolean
true
lastError
Defines if an error occurred for the latest data reloading.
Boolean
false
storageConfig
Configuration 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:

Copied to your clipboard
<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>
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.