dropdown menu open concurrently

Hi,

I'm creating a side menu. I am using the widget DropDownMenu. It is now default set as when one of the menu is open the others will be closed. I want to set the menu as we can open several menus at the same time and will close only when click on it.

Yi Wang wrote:

Hi,

I'm creating a side menu. I am using the widget DropDownMenu. It is now default set as when one of the menu is open the others will be closed. I want to set the menu as we can open several menus at the same time and will close only when click on it.

Hi YI,

Which version of Outsystems you are using and also which theme you are using?

As this is the default functionality of accordion once one item is open another will automatically be closed.


Regards,

Pankaj


Yi Wang wrote:

Hi,

I'm creating a side menu. I am using the widget DropDownMenu. It is now default set as when one of the menu is open the others will be closed. I want to set the menu as we can open several menus at the same time and will close only when click on it.

Hi Yi Wang,


It is the default functionality of the DropDownMenu widget to force the other recently opened menu. I suggest that you create your own menu by using javascript. In this case you can also make it support multilevel menus.


Keanu De Vera wrote:

Yi Wang wrote:

Hi,

I'm creating a side menu. I am using the widget DropDownMenu. It is now default set as when one of the menu is open the others will be closed. I want to set the menu as we can open several menus at the same time and will close only when click on it.

Hi Yi Wang,


It is the default functionality of the DropDownMenu widget to force the other recently opened menu. I suggest that you create your own menu by using javascript. In this case you can also make it support multilevel menus.



thanks for your suggestion.

Hi,


trying something like it

And into the Expression:

SyntaxEditor Code Snippet

"<script>
$( document ).ready(function() {"+
"$('#" + SelectId + "').multipleSelect({    SizeElementId: '#"+SizeElementId+"'," +
                                            If(TargetElementId <> "", If(usingOnClose,"onClose","onClick")+": function() { $('#"+ TargetElementId+"').val($('#" + SelectId + "').multipleSelect('getSelects'));  $('#"+ TargetElementId+"').trigger('change'); },","")+"
                                            multiple: true,
                                            toggleOptGroups: "+ If(ToggleOptGroups,"true","false") +",
                                            filter: "+ If(EnableFilter,"true","false")  +",
                                            placeholder:'"+Text_Placeholder+"' ,
                                            filterPlaceholder:'"+ TextSearchPlaceHolder +"' ,
                                            minumimCountSelected: '" + MinimumCountSelected + "',
                                            maxHeight:"+MaxHeight+" ,
                                            selectAll:"+If(AllowSelectAll,"true", "false")+" ,
                                            selectAllText:'"+text_SelectAllText+"' ,
                                            allSelected:'"+text_AllSelected+"' ,
                                            countSelected:'"+text_CountSelected+"' ,
                                            position:"+If(ToLower(PopupPosition)="top","'top'","'bottom'")+"});"+
                                            If(Selections<>"","$('#" + SelectId + "').multipleSelect('setSelects', ["+ Selections +"]);","") + "});"+

If(HideTargetElement, "$('#"+ TargetElementId +"').hide();" ,"")+
"</script>"


And in the preparation:

Cheers,

Nuno Verdasca

Hello Yi

DropDownMenu from RichWidgets does not have the functionality you want (and you would have to clone it and change it by yourself).

I recommend you to take a look at the several menu components available at Forge. 

https://www.outsystems.com/forge/Component_Search.aspx?q=menu&t=&o=&tr=False&oss=False&c=&a=&v=&hd=False&tn=&scat=forge

Probably one will suit your needs.

Cheers.