-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Selected Option should be first #436
Comments
enableClickableOptGroups |
this option is for selecting group of options. |
https://github.com/slobber/bootstrap-multiselect |
I think that what @rushbhshah1110 wants is to dynamically move the multiselect options (the The issue is that we also need to add a system to remember their initial position too, so they can go back there once deselected. This will require a bit of code. I might have a look, but no promises. |
Yes, you are definitely right. If however we ever decide to make the change to support runtime re-ordering, visual feedback would be key. Hopefully @rushbhshah1110 can give us feedback on the solution you provided? |
First of all, i appriciate your support but i am not able to find any option $('#example-multiple-selected').multiselect({selectedTop:true}) . Another thing is i am not worried about my order of position so if all my options will be disorder then it will be ok for me. @slobber is right that user experience will be bad when he clicks and option will be disappeared. And my another question is can i make any option comes always at first place. |
This is code changes @slobber made on his own clone repository here. This is not part of the current version of the original bootstrap-multiselect.
I will give it a try on my repository and give you a link for you to try it out. I still don't know if we want to add it to the master repository as it is a very specific requirement for a very specific need.
Not sure to understand, the bootstrap-multiselect checkboxes are by default ordered the same way the original select is. So if you need some options to be at the top, just build your original select this way. |
I have done selectedTop:true but anything didn't change. ohh.. about selecting first option is simple thing i need to do. thanx for this. |
i think this feature is very useful, people are tired to find which option they selected before, specially in a long list. if set the selected options to top, user can directly find what selected, don't need dynamic move 'li', just show them at top. |
@slobber yes you are right but i have get code from your repository and set selectedTop : true but it didn't change anything. |
i write a demo, please see it. |
And here is a link to my implementation here Usage:
|
I fixed a bug. JSFiddle Is it what you were looking for? |
+1 add two options:
|
Hi, I am trying to use moveSelectedToTop: true and it does not seem to be working? what could be wrong? |
+1 |
Hi, |
Can I get solution for this problem. Now I am facing the same problem. Someone please assist me |
I need a solution too please. |
I am also facing the same problem. please, guys, you have solutions for this. |
+1 is this really not formally supported 5 years on? |
I take it this never made it to the official multiselect repository since "moveSelectedToTop: true" doesn't work? |
In case anyone is still interested in this functionality, I made a small and easy to use plugin that could fit your needs. It shows the selected items in an additional optgroup listed first upon opening the dropdown. It's reloaded only when opening the dropdown, so the end user shouldn't be much confused when using it. You can check it here: https://github.com/jorgelf/bootstrap-multiselect-showselected If people find it useful, maybe its functionality could be integrated with bootstrap-multiselect itself at some point. |
Thanks everyone for providing fixes and plugins to achieve the requested functionality. I considered implementign this multiple times and everytime I was facing issues with arranging this functionality with all the other features (filtering, option groups etc.). So, I decided not to officially integrate this and instead refer to @jorgelf plugin in the documentation. |
Is there any way by which i am able to make user selected option to come at top place in drop down.
Because if i have lots of values in drop down, and user will select any of these.
After that he might not able to remember that which options he had selected.
So if anyway i am able to put selected options on top of list,user will easily uncheck those.
The text was updated successfully, but these errors were encountered: