Comments (8)
I noticed that when I load an element in the ajax-select, and after loading it a second time (same identical item) the ajax-select adds it like a new item and so on repeating the element: the correct behavior should be that if the element is previus loaded the library hasn't to load it anymore...
PS: I don't expect anyone to fix it, I'm just saying this for clarity and transparency... thank you
from ajax-bootstrap-select.
This is a bug on the bootrap-select script.
The fix here is working fine for me.
snapappointments/bootstrap-select#2738 (comment)
from ajax-bootstrap-select.
The fix almost work, but there is still a issue.
When you select another item in the loaded list, if the item is below there is no problem, but if the item is above, the text of the selected item doesn't change.
from ajax-bootstrap-select.
I had issue with multiple items being selected, not sure if will fix with the issue you have.
$('#selector')
.selectpicker()
.ajaxSelectPicker({
ajax: {
url: '/ajax_search',
},
locale: {
emptyTitle: 'Search...'
},
preserveSelected : false
});
//Added the code below
$('#selector').on('shown.bs.select', function() {
$('#selector').selectpicker('val', '');
});
from ajax-bootstrap-select.
No, it doesn't work, but what works is to change preserveSelected to true. The selected item is shown in a different line/section but it works fine that way.
from ajax-bootstrap-select.
Thank you for that, selection is working fine without the added code.
from ajax-bootstrap-select.
I like it more with the preserveSelected to true because in my case it separates the options from the one that is selected, but this depends on the use you are giving to the control. Without that it doesn't work when you select an option that is above the current selection.
from ajax-bootstrap-select.
Hello guys,
I have fixed the issue, now ajaxselect works well, at least for me and for the test that I have done.
snapappointments/bootstrap-select#2830
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)
- 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.