ajax-chosen icon indicating copy to clipboard operation
ajax-chosen copied to clipboard

Improving documentation

Open cacique-coder opened this issue 9 years ago • 0 comments

Hi good day, I want contribute with this

I needed, search a item by a property ( in backend) and show the name of the item with this property

I.E:

  • Search: C++
  • response: [{name: "My name to show, ability: "java, C++" }] In the documentacion, i don't find it so... i want contribute with this
$('.chosen-ajax').ajaxChosen({
    type: "GET",
    url: "my_path",
    dataType: 'json'
  }, function(data){
     var result = [];    
     for (var i = data.length - 1; i >= 0; i--) {
      var value = data[i];
      /* Only need add search_text with the property */
      result.push({"value" : value.id, "search_text" : value.property  ,text: value.name})
     }
     return result;
   }
)

The important Thing is: search_text

cacique-coder avatar Feb 27 '15 02:02 cacique-coder