How to prevent Multi-Valued Suggest Box from requesting suggestions

11 views
Skip to first unread message

milan....@gmail.com

unread,
Apr 22, 2013, 3:33:08 PM4/22/13
to spif...@googlegroups.com
Hi,

is it possible to enable/disable MVSB (v1.1) from requesting suggestions? I'm trying to prevent it from getting suggestions when a user types a query+ENTER before the timer elapses, so it doesn't show suggestions along with search results. 

regards,
Milan

Bess Siegal

unread,
Apr 22, 2013, 4:25:40 PM4/22/13
to spif...@googlegroups.com
Hi Milan,
I'm not quite sure I understand your question, but if you want 0 suggestions to display, you could have your REST endpoint return 0 results for the combination that you want to prevent from showing.  If this does not help, could you please describe what you are trying to achieve in more detail, or with an example perhaps?

Thanks,
Bess


--
You received this message because you are subscribed to the Google Groups "Spiffy UI" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spiffy-ui+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Milan Simonovic

unread,
Apr 22, 2013, 4:37:38 PM4/22/13
to spif...@googlegroups.com
sure, here's the thing: there's a KeyUpHandler in my MultivalueSuggestBox that runs search if the key was ENTER.
Let's say the suggest timer is 1sec. What happens when i type a keyword and press enter in less than 300ms? 
I run search for that keyword and then after 1sec the suggest timer elapses and gets suggestions. In this case
i don't want suggestions, i already know what i want to search for and run my search. 

So, I'd like to cancel the RestSuggestOracle.m_timer in a MultivalueSuggestBox.addKeyUpHandler, but it's private. 

You see what I mean?

ms

You received this message because you are subscribed to a topic in the Google Groups "Spiffy UI" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/spiffy-ui/QeVy8wSpvSE/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to spiffy-ui+...@googlegroups.com.

Bess Siegal

unread,
Apr 22, 2013, 5:07:49 PM4/22/13
to spif...@googlegroups.com
I see what you mean.  Unfortunately, there isn't a way to cancel that timer at this time.  One way to workaround the issue might be temporarily putting a class name on the body of your page which will set the pop-up's display:none.  This way it won't show up when the timer lapses, but will appear again once the class name has been removed.

-bess

Milan Simonovic

unread,
Apr 22, 2013, 6:17:41 PM4/22/13
to spif...@googlegroups.com
Having m_timer private maybe makes sense (hiding impl details..), but what was the rationale for hiding the whole oracle? It seems like a natural extension point... 

ms

Bess Siegal

unread,
Apr 25, 2013, 9:18:42 AM4/25/13
to spif...@googlegroups.com
Opening the oracle makes a lot of sense.  We'll try to get that in on the next release.  Thanks for the suggestion!
Reply all
Reply to author
Forward
0 new messages