Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

one function with two different search results #71

Closed
mcakici opened this issue Apr 21, 2014 · 3 comments
Closed

one function with two different search results #71

mcakici opened this issue Apr 21, 2014 · 3 comments
Labels
DEPRECATED jquery-textcomplete Issues associated to jquery-textcomplete (was DEPRECATED) enhancement question

Comments

@mcakici
Copy link

mcakici commented Apr 21, 2014

can we make like this ?? i wan to make like this
onetextcompletewithtwodifferentsearchtype
this picture from twitter

@yuku
Copy link
Owner

yuku commented Apr 21, 2014

Hi @wipau
Currently you can't. Only one strategy is used for a keyup.

@mcakici
Copy link
Author

mcakici commented Apr 21, 2014

i made with different way.. thanks again and its work great

template: function (value) {
        if (value[0] == 1) {
            return '<a href="javascript:void(0)"><div style="padding:2px 2px; width:260px;"><img src="'+value[4]+'" style="height:32px;width:32px; -webkit-border-radius: 3px;-moz-border-radius: 3px; border-radius: 5px; float:left;"><div style="float:left; margin-left:3px;"></img> <b>' + value[3] +'</b> <span class="text-grey small-text">@'+value[2]+'</span><br /></div><div class="clearfix"></div></div></a>';
        }else if (value[0] == 2) {
            return '<a href="javascript:void(0)"><div style="padding:2px 2px; width:260px;"><div style="float:left; margin-left:3px;"> <b>#' + value[2] +'</b> <span class="text-grey small-text"></span></div><div class="clearfix"></div></div></a>';
        }
    },
    replace: function(value) {
        if (value[0] == 1) {
            get(1,value[1]);
            return '@' + value[2] + ' ';
        }else if (value[0] == 2) {
            get(7,0,'#'+value[2]);
            return '#' + value[2] + '';
        }
    },

@yuku
Copy link
Owner

yuku commented Mar 11, 2016

Sorry for my late reply. I considered the proposed feature, but I think it is really hard to support it because some search function callbacks in async manner. Maybe your workflow is the bast way to do it. Thanks for the comment!

@yuku yuku closed this as completed Mar 11, 2016
@yuku yuku added the DEPRECATED jquery-textcomplete Issues associated to jquery-textcomplete (was DEPRECATED) label Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DEPRECATED jquery-textcomplete Issues associated to jquery-textcomplete (was DEPRECATED) enhancement question
Projects
None yet
Development

No branches or pull requests

2 participants