Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Duplicate keys detected" error message when generating from Schema with more than one "component:" inputs. #334

Closed
yolcuiskender opened this issue Dec 12, 2020 · 2 comments
Labels
bug report A submitted bug report, not yet validated. duplicate This issue or pull request already exists

Comments

@yolcuiskender
Copy link

Describe the bug
If more than one inputs with the attribute "component:" are in a schema, it sadly triggers following error message:

[Vue warn]: Duplicate keys detected: 'el-1-undefined'. This may cause an update error.

I did not find a way to add a key to the inputs to prevent this error. Maybe it's easy or maybe I have just missed it.
Just in case, here is a schema that replicates the problem.

To Reproduce
Here is a schema to replicate:
Schema:

[
  {
    class: 'text-xl font-bold',
    component: 'h3',
    children: 'Hello World'
  },
  {
    class: 'text-base',
    component: 'p',
    children: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit.'
  },
  {
    type: 'submit',
    label: 'Apply Changes'
  }
]

Reproduction

CodePen:

https://codepen.io/yi1/pen/eYdBaEB

Expected behavior
It should not throw errors in relation to the key.

If there is anything I can help further, please let me know.
Thank you very much

@justin-schroeder
Copy link
Member

Thanks for the report, this is a known issue and has been fixed in the release/2.5.0 branch. Original issue is here:

#275

You can install directly off that branch (not recommended to use in production till it's formally released) or in the meantime you can add id properties to your schema objects (discussed in the issue conversation above)

For now I'll close this as a duplicate. Good luck 👍

@justin-schroeder justin-schroeder added the duplicate This issue or pull request already exists label Dec 12, 2020
@yolcuiskender
Copy link
Author

Brilliant! 🎊

Thank you very much 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report A submitted bug report, not yet validated. duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants