| Page 1 of 1 | [ 4 posts ] |
|
Hello,
I have noticed that adding resultFormatter that formats html fragment for list rows breaks Highlight (resultHighlighter). Is it a known problem or I am missing something? This is test case: type 'f': <script src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script> <div id="demo" class="yui3-skin-sam"> <label for="ac-input">Enter a symbol or company name:</label><br> <input id="ac-input" type="text"> </div> <script> YUI().use('yql', 'autocomplete', 'autocomplete-highlighters', function (Y) { var tweetTemplate = '<div>' + '<span>{symbol}</span>' + '</div>'; Y.one('#ac-input').plug(Y.Plugin.AutoComplete, { resultFormatter: function (query, results) { return Y.Array.map(results, function (result) { var symbolInfo = result.raw; return Y.Lang.sub(tweetTemplate, { symbol: symbolInfo.symbol }); }); }, resultHighlighter: 'phraseMatch', resultTextLocator: 'symbol', source: function (query, callback) { return [{ symbol: 'foo' }, { symbol: 'bar'}]; } }); }); </script> Thanks |
|
I resolved it, kind of, by calling Y.Highlight.all(parameter, query).
|
Raj A
|
I have same issues. Can I get the sample code?
|
Alberto SantiniYUI Contributor
|
Hello Raj.
I replied you in the following post: viewtopic.php?p=39148 Regards, IceBox P.S.: This is the third post about the same topic. Use only one, please. |
| Page 1 of 1 | [ 4 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group