Open codingarmadillo opened 8 years ago
Yes, please get latest as I've updated javascript file in order to handle this.
.Source()
to specify source function name:@Html.Bootstrap().TextBox("MyInput").TypeAhead(new TypeAhead().Action("MyAction").Source("mySource"))
<script type="text/javascript">
function mySource(term, process) {
var url = $('#MyInput').data('url');
var id = 1; // whatever the custom logic for that parameter
return $.getJSON(url, { id: id, term: term }, function (data) {
return process(data);
});
}
</script>
I'd like to pass an configurable ID to my TypeAhead controller, e.g.
Is that possible?