Closed 120dev closed 7 years ago
Okay ... sorry
problem solved by simply using the callback ...
t.configSearch = {
onSelect : function (value) {
console.log(value);
},
minCharacters: 1,
maxResults : 1000,
fields : {
results: 'results',
title : 'libelle',
price : 'ref',
},
apiSettings : {
url: '/1/search/articles/{query}'
}
}
In view :
<div class="ui search" sm-search-bind="configSearch">
<input class="prompt"
ng-keypress="searchInput($event)" type="text"
placeholder="Recherche : Référence ou Article"
ng-model="article.article"
>
<div style="overflow: auto; height:300px; width:450px;font-size: 10px"
class="results">
</div>
</div>
Hi,
Thanks for your directive :)
I have a problem with the user to search through the Directive sm-search-bind, research works perfectly well, but when I click the result search, the model is not updated?
Here is the code used :
Using the code with
sm-search
, it works but I manage not retrieve the item when I press the enter key.Thank you for your help