-
Notifications
You must be signed in to change notification settings - Fork 108
Init with value which call by queryFunction #229
Comments
@arendjr can you please help me on this? |
I’m sorry, I really don’t understand what it is you’re trying to achieve. Can you create a JSFiddle with an example? |
`function queryFunction() { jQuery(results).sort(function(a, b) { $('#example').selectivity({ $('#example').selectivity('val', 'name###1'); |
@arendjr https://jsfiddle.net/cindyming/akwjqp2t/23/ the sample is here |
@arendjr Can you please take a look? |
Hi! If you change the last line in your fiddle to this:
Does that do what you're trying to accomplish? |
@arendjr I can't be able to get the text after the init for some reason, Do we have any solution to trigger the ajax loading before I use $('#example').selectivity('val', "name#####Send Multi Post") |
I’m afraid you’re searching into the wrong direction. Doing the AJAX call won’t automatically cause it to find the text. The reason setting the value isn’t sufficient is because Selectivity cannot find (without AJAX call) any item with the same ID that provides the text. So calling |
@arendjr I try to add $('#example').selectivity('data', { |
The issue in #228
@arendjr , Sorry, Maybe I did't discribe the question clearly, I don't want to cache the submenu, I want to load the submenu before the mouse over action. I try to use the mouseover event to trigger the query function, but it don't work
use case:
$(item).selectivity({ allowClear: true, items: { ['id':"amount", "text":"Amount"], ['id':"name", "text":"Menu Name",query: queryFunction, shouldOpenSubmenu: true, showSearchInput: true,], }, //showDropdown:true, multiple: multiple, placeholder: $(item).attr('placeholder'), showSearchInputInDropdown: false, })
The text was updated successfully, but these errors were encountered: