Custom Dropdown code in coral3 throwing exception

Avatar

Avatar
Give Back 5
Level 2
shajiahmed
Level 2

Likes

5 likes

Total Posts

54 posts

Correct reply

3 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 5
Ignite 3
View profile

Avatar
Give Back 5
Level 2
shajiahmed
Level 2

Likes

5 likes

Total Posts

54 posts

Correct reply

3 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 5
Ignite 3
View profile
shajiahmed
Level 2

11-05-2021

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)

View Entire Topic

Avatar

Avatar
Affirm 50
MVP
Vaibhavi
MVP

Likes

216 likes

Total Posts

181 posts

Correct reply

61 solutions
Top badges earned
Affirm 50
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Affirm 50
MVP
Vaibhavi
MVP

Likes

216 likes

Total Posts

181 posts

Correct reply

61 solutions
Top badges earned
Affirm 50
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile
Vaibhavi
MVP

11-05-2021

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.