Nested groups problem
- This topic has 7 replies, 3 voices, and was last updated 9 years ago by
wefit.lucas.
-
AuthorPosts
-
August 22, 2016 at 8:41 PM #3906
wefit.lucas
ParticipantHi 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).
August 23, 2016 at 9:26 AM #3909Anh Tran
KeymasterAh, 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.
August 24, 2016 at 2:46 PM #3919Flikweert
ParticipantI 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=0August 25, 2016 at 5:15 PM #3933Anh Tran
KeymasterHi @wefit.lucas, @Flikweert,
I've just updated the Meta Box plugin on Github with a fix for removing clones. Please try it.
Thanks
AnhAugust 25, 2016 at 5:23 PM #3935Flikweert
ParticipantWorks for me. Thanks!
August 27, 2016 at 2:25 AM #3946wefit.lucas
ParticipantWorked 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.
August 31, 2016 at 2:28 PM #3971Anh Tran
KeymasterHi,
Currently, we can support only drag and drop clones within its parent. Moving it into another container (another group) actually breaks the JavaScript code 🙁
August 31, 2016 at 7:04 PM #3978wefit.lucas
ParticipantYep. 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.
-
AuthorPosts
- The topic ‘Nested groups problem’ is closed to new replies.