163
Views
6
Comments
[Multiple Selection Dropdown (ReactAndMob)] How to achieve Enable / Disable functionality
Application Type
Reactive

Hi,

This component has  no "Enabled" property (why??). How to achieve functionality of such a property? Manipulating the IsEditable property of item is definitely not a solution.

Regards

Tomasz

UserImage.jpg
Bryan Richter

I was looking for this functionality as well.  Thank you.


UserImage.jpg
Chris Stacey

Hi @Bryan,

I'm excited to announce MultiSelect_ReactAndMob version 1.6.1 has been released.

New Features

  • Added option: enable/disable the widget
    When MultiSelect_ReactAndMob parameter "IsEnabled=True", the widget functions normally.
    When MultiSelect_ReactAndMob parameter "IsEnabled=False"
    • User can open/close the dropdown menu (to view current selections), but cannot make changes.
    • The text and border of the dropdown bar are grayed out.
      (i.e. text in the stationary bar at the top, NOT the menu that drops down)
    • All checkboxes (and their labels) in the dropdown menu are grayed out.
    • The "Select All" and "Select All Results" checkboxes (and their labels) are removed (if they were present).
    • The Search Tool remains (if it was present), so the user can search the current selections.

  • Added behaviour: While all dropdown menu items have "IsEditable=False", the entire widget is disabled (as if "IsEnabled=False").


Hope this helps!

Please let me know if you have any issues!

Cheers,
Chris.

UserImage.jpg
Tejas Mendse

Hi @Tomasz M. Lipinski & @Bryan Richter - Until the component owner adds the enable attribute, There is one way by which you can disable the multiselect widget. Please follow below way -

  1.  Take one container and move the multiselect widget inside the container.
  2. Add style attribute to the container and set it's value as style = "pointer-events:none"
  3. You can have the conditional approach as well by using if condition in the style property.


URL - https://tejas-mendse.outsystemscloud.com/TestModule/Multiselect?_ts=637962457297306354



UserImage.jpg
Bryan Richter

@Tejas Mendse This is only half of the solution, because it does not include the css for the appearance of being "disabled".  The discussion of "enabling containers" that I used, https://www.outsystems.com/forums/discussion/62368/enable-disable-container-on-button-click/. What you provide prevents mouse clicks, but does not provide any visual feedback to the user, that they cannot interact with the items in the container.

What we did was:

1.  Used a container and set the Style Classes of the container properties to 

If(Enable_Container,"","disable-dropdown ") + "col-12 col-md-6 col-lg-4 order-3 order-md-2"

Enable_Container is a boolean.  

Note ..."disable-dropdown ") + "col-12... concatenates "disable-dropdown" and a space " " to the list of existing classes applied.  Fail to add space between the "disable-dropdown" and "col-12..." and you will get a non existent class.

We added the following CSS to our Theme Style Sheet

/* Disable container using Multi-select dropdown */

.brass-disable-dropdown .multi-select-react-and-mob-root > .multi-select-react-and-mob-dropdown-bar {

   background-color: var(--color-neutral-2);   

   border: 1px solid var(--color-neutral-4);    

   color: var(--color-neutral-6);    

   pointer-events: none;

}

Note the .multi-select-react-and-mob-root > .multi-select-react-and-mob-dropdown-bar this targets/reaches into the multi-select to give it the appearance of being disabled.  

Hope that helps.


UserImage.jpg
Chris Stacey

Hi Guys,

I’m glad you found you can override the css. The whole component was designed so you can easily override the css 👍.

Given there are a few requests for a disabled feature, I’ll add one in the coming days. Thanks for the feedback 👍❤️.

Kind Regards,

Chris 

UserImage.jpg
Chris Stacey

Hi Guys,

Apologies for the delay. Working through some unexpected complications with the new Service Studio Beta version. I expect this to be finished in the next 3-4 days (hopefully sooner).

Kind Regards,

Chris

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