Setting Options for a Select component gives console errors

Whenever I set Options for a Select component like this:

For some reason, I do get one Console log message like this:

sdk.js:16 Invalid option item in the Select Component, make sure each option object has defined "objectId" property, otherwise the option will be skipped
(anonymous) @ sdk.js:16

Not sure how to interpret this - is this to be expected, or am I missing something that would remove those errors from the Console?

Hi @Egil_Helland

Invalid option item in the Select Component, 
make sure each option object has defined "objectId" property, 
otherwise the option will be skipped

make sure you passed a list of objects where each object contains the following property objectId

The objectId (KeyValue) can be changed to any property which should be used as value id,value,name,etc. in the component settings on the UI section

Regards,
Vlad

That is the strange thing - all objects passed in the list have objectId and name. However, I notice that when I try to debug this by doing some Console printing, the following:

Returns as:

So this is a timing issue then I guess - but how can I control the timing so that this does not fail like it does here? I do the loading on Page Enter now.

are there any logs before the error?
could you please share a link to the preview?

No, there are no logs before this. What link can I give you so that you can review this @vladimir-upirov? The app is under development, not published anywhere yet.

the URL you open the app preview

https://reveredneed.backendless.app/api/files/ui-builder/containers/instructor/index.html?page=events&data={}

Thanks for sharing the link, I can see what causes the error:
By default there is in the Select specified list of options:

[
{ value:"...", label:"..."},
...
]

but since the valueId now is “objectId” instead of the “value” it throws an error

So, to fix the error just clear all default items

Regards,
Vlad

Would love to do that @vladimir-upirov, but how? When I remove all but the last one from the GUI, and blank the last fields like this:

I still get the same error… :frowning:

I see,
It seems like a bug on our side, we are going to fix it asap.
At this moment ignore the error message, it does not affect the app running, it’s just an error message.

thank you one more time for taking time to share the issue with us :handshake:

Glad to hear I did something right for once :smiley:

Good luck fixing the bug, and thanks for quick attention, as always!

@vladimir-upirov Any update on progress to this? No haste on my part, just want to make sure it is captured in your end and in some priority list :smiley:

Hello, @Egil_Helland.

This ticket is pending release at the moment. Fix will be available within 1-2 weeks.

Regards, Nikita.

Hello @Egil_Helland

We’ve just updated cloud servers with a fix for the issue you described above. Could you kindly let us know whether fix works for you well?

Regards,
Inna

Hi @Inna_Shkolnaya

No, it does not seem to be fixed for me. I still get the same error messages.

Hello @Egil_Helland

I can’t reproduce this in my application. Are you getting this in an older component? Try adding a new component.

Regards,
Inna

Hi @Inna_Shkolnaya

Yes, I have not deleted and recreated the pages in my app using select components, if that is what you mean. Is that what you wanted me to test? If so, is it “just” the select component that must be re-added?

Hello @Egil_Helland

Sorry for the long reply. Yes, you need to re-add the component. Could you please check again and let us know if the fix works for you?

Regards,
Inna

I have tried now @Inna_Shkolnaya (or rather, on a new page), but I still get these “Invalid option item in the Select Component…” errors.

Do you have an example where this does work on your end, so that I can review and see if I am doing something bananas in my code?

Here’s a test I just tried:

My Select component setup:

My table data:

Logic to assign Select options:

Final result:
https://www.backendless.us/api/files/ui-builder/containers/support/index.html?page=selectassignment