-
Notifications
You must be signed in to change notification settings - Fork 183
Description
eg. use case:
I have an uidl that has elements with elementType: group and when I use this uidl to generate a component I want to map this elementType to Fragment.
Now, I thought this was possible through mappings but I think there's an issue:
In resolveElement originalElement.semanticType has precedence on mappedElement.elementType wich is ok, but what I don't understand is, resolveElement is called in resolveNode wich is called in resolveUIDL after setFriendlyOutputOptions that will add a default semanticType to the element, so when it go to resolveElement the element will always have a semanticType.
Is this a bug? Or is just the expected behaviour to not replace the elementType on generateComponent flow?
Here's the sandbox of the example above https://codesandbox.io/p/sandbox/custom-component-generator-forked-rcz39t?file=%2Fsrc%2Findex.js