I have created custom grids in Admin and given store switcher by XML file as below.
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<title>Products</title>
</head>
<update handle="styles"/>
<body>
<referenceContainer name="page.main.actions">
<block class="Magento\Backend\Block\Store\Switcher" name="products.store.switcher" template="Magento_Backend::store/switcher.phtml"/>
</referenceContainer>
<referenceContainer name="content">
<uiComponent name="products_listing"/>
</referenceContainer>
</body>
How can I keep my default store as selected on the page load?
Also I have 4 websites and each have 1 store. on the grid listing page default store view should be selected and display for example US.
When i go record edit I have to display store switcher there to. And in this store switcher only display website and store which belongs to that product. Currently from list page I select the store and go to any product of that store then it's displaying selected store but in dropdown displaying all the websites and stores even product is only for 2 stores.