5 (100%) 1 vote

The sticky header component is a Listing/Grid Secondary Component. It is responsible for rendering additional grid header and grid toolbar. It is displayed when the persistent header gets hidden during vertical scrolling. The persistent header reactivates when you scroll back up. You can see it like

Sticky Header Component in Magento 2
Sticky Header Component in Magento 2
  • You can see the js constructor in the file \vendor\magento\module-ui\view\base\web\js\grid\sticky\sticky.js.
  • It uses main template vendor\magento\module-ui\view\base\web\templates\grid\sticky\sticky.html

Sticky Header Component in Magento 2

  • It is used in a grid by using this configuration

  • You can take a look t the cms page grid to see more details vendor\magento\module-cms\view\adminhtml\ui_component\cms_page_listing.xml

  • You also can change the template for sticky header by using configuration:

The  steps I mention above is the shortest process for you to do Sticky Header Component in Magento 2. With this guide, you can manage the Sticky Header Component in Magento 2 easily. Every store has a Sticky Header Component in Magento 2 with many attributes.

Thank you for reading this post and see you in other posts from Magestore!

 

How to Use Cookie in Magento 2
How to Add Top Link in Magento 2