Skip to content

When using the ui component to create dynamic rows in Magento 2, the first line white space row is visible. What is the problem? Please elaborate

enter image description here

It is the white space. How to remove this white space in first row?

    <dynamicRows name="attribute_options_select" >
        <settings>
            <addButtonLabel translate="true">Add Value</addButtonLabel>
            <additionalClasses>
                <class name="admin__field-wide">true</class>
            </additionalClasses>
            <componentType>dynamicRows</componentType>
        </settings>
        <container name="record" component="Magento_Ui/js/dynamic-rows/record">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="isTemplate" xsi:type="boolean">true</item>
                    <item name="is_collection" xsi:type="boolean">true</item>
                    <item name="componentType" xsi:type="string">container</item>
                </item>
            </argument>
            <field name="is_default" component="OX_CustomerAttributes/js/form/element/checkbox" sortOrder="0"
                   formElement="checkbox">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="prefixElementName" xsi:type="string">option_</item>
                        <item name="inputCheckBoxName" xsi:type="string">default.</item>
                        <item name="columnsHeaderClasses" xsi:type="string">control-table-options-th</item>
                        <item name="modules" xsi:type="array">
                            <item name="rows" xsi:type="string">ns = ${ $.ns }, index = attribute_options_select
                            </item>
                        </item>
                    </item>
                </argument>
                <settings>
                    <additionalClasses>
                        <class name="control-table-options-cell">true</class>
                    </additionalClasses>
                    <dataType>boolean</dataType>
                    <label translate="true">Is Default</label>
                </settings>
                <formElements>
                    <checkbox>
                        <settings>
                            <prefer>radio</prefer>
                        </settings>
                    </checkbox>
                </formElements>
            </field>
            <field name="position" component="OX_CustomerAttributes/js/form/element/input" formElement="input">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="prefixName" xsi:type="string">option.order</item>
                        <item name="prefixElementName" xsi:type="string">option_</item>
                    </item>
                </argument>
                <settings>
                    <dataType>text</dataType>
                    <visible>false</visible>
                </settings>
            </field>
        </container>
    </dynamicRows>