DOM values of existing Multifield Items changing after adding New
I have a custom tab in page properties where I have a multifield, the multifield consist of a coral-textfield which I convert to a coral-autocomplete through jquery on page load like below example :
Coral.commons.ready(autocomplete, function () {
autocomplete = new Coral.Autocomplete().set({
placeholder: "place holder",
name: "/xyz",
match: "startswith",
required: true,
delay: 600
});
This works quite well the first time despite I add one or 10 items and also saves my autocomplete data at ./xyz in JCR, my issue starts when I load the saved page property and try to add more items to existing multifield, the moment I click add, the name attribute of existing coral-autocomplete in existing multifield-item changes to something like ./xyz./xyz and value becomes empty, and existing fields despite having data shows required, in this whole scenario the newly added item remains correct, similary if I start with 2 and later add 3rd first 2 will get wrong name and value and soon as I click add button of multifield to add 3rd item.
I am on 6.5 and use coral UI3