When using a DropdownTags element in a Reactive Web application and using the result of a Data Action as the ItemList for the DropdownTags element (for example a list of countries), then the DropdownTags element adds duplicate entries every time the Data Action gets refreshed.

This seems like a bug to me.

Attached you can find an .oml file that shows this behaviour.


Solution

Hi Steven,

Yes looks like it has a bug. I will inform the responsible team by this. Meanwhile for workaround you can copy the DropdownTags and Choices.js from OutsystemsUI and do a simple change on the client action init > Init(JS) 

elementId.options.length = 0; <- add this line here
    choices = new Choices(elementId, options);
    $parameters.ChoicesObj = choices;

In attachment i changed your module.

Regards,

Marcelo

Solution

Hi Steven,

A fix will be available on the next release of OutSystems UI. 

Thak you for the report!


Best regards,

Bernardo Cardoso

Hi Marcelo, 

Thanks for solving this bug so quickly!

I've noticed some other problems with the DropdownTags component.  I created another forum post for those:

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

Feel free to have a look, you seem knowledgeable about this. Maybe you can find fixes for those as well.

I've also registered a support case for it, but I also did for this bug, and it got solved faster through the forums thanks to you.  The support case was still in 'new' state.

Hi Steven,

I will try to get some time in the next couple of days to look into it. I will let you know my findings.

Regards,

Marcelo