Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Custom Dropdown code in coral3 throwing exception

shajiahmed
Level 3
Level 3

I have written some code for select dynamic drop down, some where form the code the error is propagated to coralui3. When I debug the code I don't see any error coming form custom code, everything seems to be pointing to coralui3. 

 

Uncaught TypeError: Cannot read property 'indexOf' of undefined
at HTMLElement._onItemAdded (coralui3.js:28505)
at HTMLElement._onItemSelected (coralui3.js:28556)
at HTMLElement._onItemSelectedChange (coralui3.js:28961)
at Vent._executeListenersAtElement (coralui3.js:4147)
at Vent._executeBubbleListeners (coralui3.js:4256)
at HTMLElement.Coral.Component.trigger (coralui3.js:8729)
at HTMLElement.doTrigger (coralui3.js:6046)
at HTMLElement.setter [as selected] (coralui3.js:6216)
at HTMLElement.Coral.Component.attributeChangedCallback (coralui3.js:8377)
at HTMLElement.o (coralui3.js:3881)

coral3
1 Accepted Solution
Vaibhavi
Correct answer by
Community Advisor
Community Advisor

Hi @shajiahmed , 

 

Custom code must be making the call to coral js. As per the the error indexOf is called on undefined obj.

Please back trace the code to understand how HTMLElement._onItemAdded will be called. 

Setting the break point and debug in the developer tool will help. 

View solution in original post

1 Reply
Vaibhavi
Correct answer by
Community Advisor
Community Advisor

Hi @shajiahmed , 

 

Custom code must be making the call to coral js. As per the the error indexOf is called on undefined obj.

Please back trace the code to understand how HTMLElement._onItemAdded will be called. 

Setting the break point and debug in the developer tool will help. 

View solution in original post