61
Views
4
Comments
Unable to collapse the multiple selection dropdown  when clicked outside of it

Hi everyone,

I am facing an issue with the multiple selection dropdown (MSD) forge component. The functionality is working almost fine but I've noticed two issues. They are :

1. when I click anywhere inside the screen, the dropdown should get collapsed. And it is working fine in general. But, when I click on any link in that screen, the dropdown is not getting collapsed. And it is raising JavaScript errors as well.

2. When the dropdown is placed inside a popup, when I click anywhere outside the dropdown in the popup, the dropdown menu are still in expanded state only


I have attached the corresponding OML and screenshots below. Please let me know if there is any way to fix it. I appreciate your support. Thank you





CustomDropdown.oml
Error On Clicking Click Here.png
Popup SS.png
Forge Component SS.png
Service Center Error Logs.png
2023-09-14 18-11-13
saad siddiqui

Hello Dinesh, 

I just have a suggestion for you, you can try to use server side dropdown or drop-down tag which are already existing in outsystems UI module, you might have to take dependency in your module. 

Dropdown server side 

Dropdown tags

There's also a client action, DropdownClose from outsystemsUI that you can use to close both dropdown components mentioned above, you just have to pass the widget I'd in the action. You might use the DropdownClose on OnChange event or however your use case is.

If you still face any issues, please let me know, I'll give you a sample oml for the same to have a better understanding.

Thanks,

Saad Ahmed 

2023-08-30 05-48-39
DINESH KARASU

Hi Saad Siddiqui ,

Thank you for your suggestion. With the dropdown server side , I am able to select only one item. But I want to select a list of items with checkboxes and need the clear selected functionality as well. The dropdown tags widget is helpful but not matching my use case exactly. Inorder to customise that, I went for a forge component

Can you pls provide OML or any other idea that resolves the Javascript issue? 

Thank you,

Dinesh

2023-09-14 18-11-13
saad siddiqui

Did you try setting the AllowMultipleOptions input parameter to true?

2023-08-30 05-48-39
DINESH KARASU

Yes Saad Siddiqui, I have done that. with that option I am able to select multiple items but it's returning only the last selected value instead of a selected items list

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.