magento-2-admin-ui
magento-2-admin-ui copied to clipboard
Can't sort dynamic rows
Hi,
First of all thank you for the very nice module. It made my custom widgets looked very easy and beautiful.
I only have concern regarding dynamic rows. I know that I can drag it from the admin, but if I'm saving it, its not really saving and does not make any effect. Any chance that it can be fixed?
I'm using Magento 2.4.6 also this is the module that I am building:
https://github.com/UpSage/SlickSliderWidget/tree/update/initial
I hope I can get a reponse.
Thank you
Hello UpSage. This has been fixed. Please update the module to version 1.0.3 and add the following field position
to your dynamicRow component.
<field name="position" component="Magento_Catalog/js/form/element/input" formElement="input">
<settings>
<visible>false</visible>
</settings>
</field>
Hi @graschik . Thank you so much. I have tested it and it works
Hi @graschik ,
There's another bug. If you add a delete button to the dynamic rows, the row won't delete if there is a position field. The loader keeps spinning.
<field name="position" component="Magento_Catalog/js/form/element/input" formElement="input">
<settings>
<visible>false</visible>
</settings>
</field>
<actionDelete template="Magento_Backend/dynamic-rows/cells/action-delete">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="fit" xsi:type="boolean">true</item>
</item>
</argument>
<settings>
<dataType>text</dataType>
<label>Actions</label>
<componentType>actionDelete</componentType>
</settings>
</actionDelete>
Got it working using this instead:
<field name="position" formElement="input">
<settings>
<visible>false</visible>
</settings>
</field>
Sorts and can be deleted without issues
Thank you UpSage