Skip to main content
1 of 6
0xh8h
  • 485
  • 1
  • 7
  • 21

How to extends core UI Component in Magento 2

I tried to bring Sales -> Shipments grid into my extension. It works fine when I use this in my layout file .xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <update handle="styles"/>
    <body>
        <referenceContainer name="content">
            <uiComponent name="sales_order_shipment_grid"/>
        </referenceContainer>
    </body>
</page>

But there is a problem. I need to add some more columns to the grid in my extension, but I don't want those columns appeared in Sales -> Shipments grid.

I tried the solution in this link to add new column to the grid How to add new column to core module of admin grid in Magento2

But those columns appear in both places (which I don't want to)

I think the best solution here should be some kind of mechanism to "extends the core ui component", but I don't know how can do this in Magento 2.

How can I do this? Thank you.

0xh8h
  • 485
  • 1
  • 7
  • 21