Conversation
|
I went for an approach where if you give multiple components to the addComponentField it creates under the hood a UnionComponentField if you add just one component it creates a basic component. Not sure or this is an approach you like but felt convenient for me |
|
Hey @MokumJ 👋🏼 Thanks for creating the PR. I am sorry it took us time to review this. Would it be possible if we can have separate methods for Component and ComponentUnion field? Because there can be scenarios where we only want a single component in ComponentUnion field. Also I was facing some issues with type of the addComponentField(
field: Omit<
CreateComponentFieldArgs,
"modelApiId" | "parentApiId" | "componentApiIds"
>
): Model;I have added addComponentUnionField(
field: Omit<
CreateComponentFieldArgs,
"modelApiId" | "parentApiId" | "componentApiId"
>
): Model;I am removing What do you think about this? |
|
Hi @rajatsharma, glad to hear from you and great you are picking this up :) I agree with separating the component and ComponentUnion field. I guess its also more in line with previous use case of simplefield/unionfield. I see indeed those types should be omitted. Are you picking up this points en add to the commit or should I have a look into it? I am not sure when I would have time for this. Maybe next monday. |
|
@rajatsharma |
Uh oh!
There was an error while loading. Please reload this page.