Skip to content

Ui form is broken by ui grid if it's added into the form #8141

@ytorbyk

Description

@ytorbyk

Preconditions

  1. Developer branch is used

Steps to reproduce

  1. I try to add ui grid on customer edit page (which is ui form)
  2. I created app/code/Jyt/TestModule/view/adminhtml/ui_component/customer_form.xml file with contend
<?xml version="1.0"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <fieldset name="customer_cms_pages">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="label" xsi:type="string" translate="true">CMS Pages</item>
            </item>
        </argument>
        <insertListing>
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="ns" xsi:type="string">cms_page_listing</item>
                    <item name="autoRender" xsi:type="boolean">true</item>
                </item>
            </argument>
        </insertListing>
    </fieldset>
</form>
  1. cms_page_listing is used for example only.

Expected result

  1. Grid is rendered properly
  2. It's posible to save the customer edit form

Actual result

  1. It's impossible to save the form, js error is thrown

ui_form_grid_error

  1. Grid it rendered, but with ui bugs

ui_grid_in_ui_form_1

ui_grid_in_ui_form_2

Question: Is it possible to pass current customer (from the url or edit form) to grid collection somehow or backend session data should be used here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: FrontendEvent: dmcdindia1Issue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releasebug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions