Comments (5)
Hi guys,
I had also the same issue that i have some options before load ajax bootstrap select to a element.
But i resolve by using
$('your element ID').trigger('change');
after you add the ajax bootstrap select.
in your example http://jsfiddle.net/okbnumdc/10/ add this line in the end of js.
$('select').trigger('change');
It works fine for me but couldn't keep more then one options. If any one can resolve it let me know please.
from ajax-bootstrap-select.
@sharmi89 it couldn't keep more than one option in the example at least because it wasn't a multi select.
See: https://jsfiddle.net/okbnumdc/14/ for an example with multi select working with your patch for at least temporarily resolving this.
from ajax-bootstrap-select.
This issue: #41 applies to single selects as well. I still haven't figured out why the heck its not working on pre selected options. If you figure out anything when working through this please let me know. Right now I could take any information.
Sorry its not working for you.
from ajax-bootstrap-select.
Thanks @sharmi89! Your solution works like a treat.
At least in the fiddle, I still have to figure out why it fails in my project, but that is another story :)
from ajax-bootstrap-select.
#76 should fix this. If its still an issue open a new issue.
from ajax-bootstrap-select.
Related Issues (20)
- reset/clear previous search result HOT 1
- ajax-bootstrap-select breaks required field HOT 1
- with-ajax makes changed.bs.select event to be called on search, not on change HOT 10
- New release - update of dist files
- How to hide locale.statusInitialized field?
- No results event HOT 1
- Trigger options when initialization HOT 1
- Post not not reach the server
- Attempting to destroy selectpicker and reinitialize ajaxselect creates standard select HOT 2
- Cancel the previous request if another one has been sent. HOT 1
- multiple + preserveSelected + default <options> groups unselected options into 'Currently Selected' HOT 2
- Selecting an empty option doesn't seem possible
- Add sort for selectpicker
- not working correctly in mobile
- Search Filtering
- Add support for HTML attributs "data-xxx" on custom content
- Return in HTML (Retorno em HTML)
- In Bootstrap 5.2.3 Ajax-Bootstrap-Select doesn't work HOT 8
- Select text content as you type (Selecionar o conteúdo do texto enquanto digita) HOT 1
- Make the function dynamic (Deixar a função dinâmica) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ajax-bootstrap-select.