Error while using an iteration in a custom component

Hey Appfarm

We have this message error in a filter while using an iteration inside of a custom component

can we have more details about it ? because our enum still exist (enum of type string )

the same filter works without custom component

Thanks :smiley:

Hi @Yassine.tebib
Can you share some more details about the setup?
Is the enum passed into the component as a component parameter and then used as a filter within the iterating container? Can you also share how the filter is set up?

Hi, I’m Yassine’s colleague.

The issue was that I was using app data directly without passing it through a component parameter. I was able to resolve this by passing my RT through a component parameter.

However, now I face a new problem: I want to apply a filter on the component parameter within a function, but it seems like this isn’t possible. I’m using this function inside a motion to conditionally display an element. How can I work around this?

To illustrate:

Here, I pass my RT directly and filter on it.

But I can’t filter on the component parameter.

Thanks in advance for your help!

Hi @JustineC . Unfortunately, using component params with filters in a function param will not work. However, this has already been requested and will be available soon.
Until then you might set this as an app-variable and feed it into the component-function. Could that work in your scenario?

Ok, I will try that.
Thanks for your answer,

Have a great day !

1 Like