Multi-Select Dropdown with search

Hi,

     I'm working on a reactive application by developing the dropdown with multi-select and search functionality. While I'm searching the prior selected options disappears. I've attached my OML, Please help me to fix this!


Thanks in advance!

MultiSelectDropdown.oml

mvp_badge
MVP
Solution

You're welcome, Jaiendiran Mohan :)

Please refer to the attached updated .oml file.


Kind regards,

Benjith Sam

MultiSelectDropdown.oml

mvp_badge
MVP

Hi Jaiendiran Mohan,

After analyzing the shared .oml file, I observed that the drafted solution flow does require some code changes in order to achieve the desired output.

Note that the List operations play a key role in such type of implemenation.

Suggestions:

  • Instead of looping the list of records using for-each loop its prefered to use available in-build client/server List actions
  • For search filter, It's better to locally filter the list data type variable holding the Movie list, instead of performing an Aggregate filter i.e. Data Action refresh, followed by re-executing the complete data fetch action flow

See the sample implemenation Multi-Select Demo

Please refer to the attached updated .oml file

I did a lot of code refactoring, let me know if you find any dificulty in understanding the implemenation.


Hope this helps you!


Kind regards,

Benjith Sam

MultiSelectDropdown.oml

Hi @Benjith Sam,

     Thanks for your response. The Sample Implementation works fine but the OML has some dependency issues. Also, the OML file is not working as expected. Can you share with me the sample implementation?

missingdependency.png

mvp_badge
MVP
Solution

You're welcome, Jaiendiran Mohan :)

Please refer to the attached updated .oml file.


Kind regards,

Benjith Sam

MultiSelectDropdown.oml

Champion

Hi Jaiendiran,

In my case, for the search functionality I use the control/select2 widget. On the click event, you can add the selected item to the local list item.

Hope it helps

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