1

In this context we use the term UiComponent to define a configured collection of components to create a form or a listing, for example customer_form which is configured in customer_form.xml

How can I create a new uiComponent(e.g. my_customer_form) that extends from existing one(customer_form)?

I'm 90% percent sure there is a way to inherit from existing uiComponents but i can't remember what is the syntax.

For example in my component to write:

<form>
...
<some_special_node>customer_form<some_special_node>
...
</form>

As a result my new uiComponent has everything the customer_form has and I can add new fields.

Any tips are highly appreciated.

1 Answer 1

1

Found it. All you have to do is add the extends="parent_name" attribute to the listing or form node as follows:

<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         extends="parent_listing_componnt"
         xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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