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

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">
| improve this answer | |

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.