happeo / custom-widget-templates

Templates for Custom Widget
Apache License 2.0
3 stars 6 forks source link

fix: accordion row cannot be removed #27

Closed mikamaunula closed 1 year ago

mikamaunula commented 1 year ago

Fixes following issues

First Issue:

When creating the widget for the first time, and deleting the first item. The last item is deleted instead of the first one. Feel free to check GIF1

Steps to reproduce:

Create a new accordion widget.

Add a couple of rows.

Delete the first row in the widget. (as a result the last row will be deleted instead) GIF1

Issue can be avoided by saving the widget once creating it then the deletion will work as expected, it only appears the first time creating the widget.

Second Issue:

Deleting the last item in the accordion widget isn’t taking action after hitting save and refreshing the page. Feel free to check GIF2

Steps to reproduce:

Create an accordion widget, add some items, and Save.

Edit the widget and delete the last item, and Save.

Refresh the page ( the deleted item will appear again) GIF2

bhorkarg commented 1 year ago

Closing PR since accordion widget was moved to https://github.com/happeo/accordion-widget and these changes are already incorporated there.