Support Forum
Support › Meta Box Group › Nested groups problem
Hi Anh,
I'm sorry to create a new topic, but you closed the other one. What I was trying to say is that I want you to maintain your component logic, the problem is that is not behaving like it should. When I create a group it should keep at least one clone and that is what I want. The problem is that in that example of code, the 'delete' button appears even when I have just one clone and it shouldn't. And since the button appears, I'm able to delete all clones when I shouldn't be (and after that I can't create new ones, so a page refresh is needed).
Ah, I got it. Sorry for the misunderstanding. I thought you want just to show the "Add new" button and don't show any input. I will check the "Delete" button now.
I think i have a similar problem. When i delete all clones, i am not able to add a new clone. I made a screen recording. See the link below:
https://www.dropbox.com/s/58v0wszrscrsn80/Meta%20Box%20-%20Group%20Clone.mov?dl=0
Hi @wefit.lucas, @Flikweert,
I've just updated the Meta Box plugin on Github with a fix for removing clones. Please try it.
Thanks
Anh
Works for me. Thanks!
Worked here as well, thanks.
Anh, I'm having another problem (but it was there before your update). In the same code example, when you create the nested cloneable groups it is possible to sort and drag them anywhere, like for example move a child to same level as its parent or even move a child to a different parent. Once you move it, it'll break the Add clone button and I'm assuming it will mess up with the data in the JSON. Is there a way to avoid that?
Thanks.
Hi,
Currently, we can support only drag and drop clones within its parent. Moving it into another container (another group) actually breaks the JavaScript code 🙁
Yep. I don't want that to change. I think that its the expected behavior, but I think that I should not me able to drop the element outside its parent like I am as of today.