0

I have created a custom module in my Magento 2.3.1 site. The module has Admin Listing Grid and Add/Edit view. My site is multi-store site, Now I want to display "Store View" filter in listing grid at admin. Can you anyone guide me to add it? I also want to filter the listing result as per the filtered store id. Please see attached screenshot of Magento CMS module filters. I want to add same "Store View" filter in my custom module listing grid. I have used "ui_component" .xml file to display listing grid in my module. So, Please help to add "Store View" filter in "ui_component" xml file.

Thank you in advance.

enter image description here

0

Create a column similar to this in your ui component for the grid page or update the already existing one with options and config nodes just as below.

<column name="some_name">
    <argument name="data" xsi:type="array">
        <item name="options" xsi:type="object">Magento\Cms\Ui\Component\Listing\Column\Cms\Options</item>
        <item name="config" xsi:type="array">
            <item name="filter" xsi:type="string">select</item>
            <item name="label" xsi:type="string" translate="true">Store view</item>
            <item name="dataType" xsi:type="string">select</item>
            <item name="editor" xsi:type="array">
                <item name="editorType" xsi:type="string">select</item>
            </item>
        </item>
    </argument>
</column>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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