Sachini / freebase-suggest

Automatically exported from code.google.com/p/freebase-suggest
Other
0 stars 0 forks source link

Better support for 'soft' suggest #10

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In 'soft' mode

* There's no notification when the user enters free-text. How about 
triggering 'fb-select' with data=null ?

(I need notification so I can wipe any previously selected Freebase topic)

* And if you type a string that's not in freebase you still get the message:
"No suggested matches. Tips on getting better suggestions [snip]"

Since the developer is allowing free-text, perhaps the default message 
should just be "No suggested matches. Press enter to use this text".

Original issue reported on code.google.com by will.moffat on 2 Dec 2009 at 8:06

GoogleCodeExporter commented 9 years ago
There is an "fb-textchange" event that is triggered on textchange.

You should be able to set a "nomatch" option (html).

So as a recap:

$("#myinput").suggest({
  nomatch: "No suggested matches. Tips on getting better suggestions [snip]"
}).bind("fb-textchange", function(e) {
  // do something on textchange
});

Original comment by daep...@gmail.com on 10 Dec 2009 at 6:37

GoogleCodeExporter commented 9 years ago

Original comment by daep...@gmail.com on 10 Dec 2009 at 6:38

GoogleCodeExporter commented 9 years ago
Thanks! nomatch and fb-textchange solve my problem.

But I found another bug. Typing 'sdfsdfdsfddf' and then pressing enter does not 
dismiss 
the suggest dropdown.

Original comment by will.moffat on 11 Dec 2009 at 2:14