How to deal with Cannot read property 'destroy' of null using Dropdown tags?

Hi All,


I'm implementing a status filter using dropdown tags from OS UI (Reactive web app), and I have gotten this error message (Cannot read property 'destroy' of null) every time I land on the page. Does someone how to fix this problem?

can you please share OML so we can check whats the problem.

Tamirys Barina wrote:

Hi All,


I'm implementing a status filter using dropdown tags from OS UI (Reactive web app), and I have gotten this error message (Cannot read property 'destroy' of null) every time I land on the page. Does someone how to fix this problem?

Hi Barina

please check the below post might be help

https://www.outsystems.com/forums/discussion/56472/dropdowntags-outsystems-ui-reactive-bugs-empty-itemlist-hides-field-wrong-la/



your issue is not related to Dropdown, On destroy is a event of screen which fire when you change or load screen.

can you check variable you are binding to Dropdown tag has some data and not empty.

Also debug on destroy event of screen.

Hi! 

The system is trying to use a property from an element that isn't in the screen. Have you elements in your screen that are "hidden" through an "if" ?   

Abdul quadir Saifee wrote:

your issue is not related to Dropdown, On destroy is a event of screen which fire when you change or load screen.

can you check variable you are binding to Dropdown tag has some data and not empty.

Also debug on destroy event of screen.

Yeah, I get this error because the list is empty and I'm not using on destroy in any screen


Maria da Graça Peixoto wrote:

Hi! 

The system is trying to use a property from an element that isn't in the screen. Have you elements in your screen that are "hidden" through an "if" ?   

Yeah, My if is checking if the user has admin role, if it is true, it is showing "one screen" and if it is false "another screen"


I'm not an expert in JavaScript but you, probably, have to "inspect" your screen to try to understand which  element is issuing the error.

It is perhaps an element that was out of an "If" when you initially put it in the screen and was drag into an if branch after. 

Hope this gives you some ideas. 


I have updated OS UI component to the last version and this bug was fixed there :)

Nothing on my side, Thank you all!