documentcloud / visualsearch

A Rich Search Box for Real Data
http://documentcloud.github.io/visualsearch/
MIT License
1.8k stars 225 forks source link

clearing search box should trigger search callback #21

Closed ewang closed 12 years ago

ewang commented 13 years ago

Currently, each time a facet is deleted, the search callback is triggered. Using the "X" to clear all facets should also fire the search callback.

jashkenas commented 13 years ago

To argue for the opposition -- I'm thinking that we should stop having facet deletion fire callbacks ... usually when I want to delete a facet, it's because I'm about to type in something else ... not because I want to search for the more general case -- when I do, it's easy enough to press Enter.

ewang commented 13 years ago

Your argument makes sense. However, I think it'd make sense for the "clear all" to return the results list to the original, unfiltered state. The issue I am facing right now is to have the results list be representative of the query. It becomes confusing if the user forgets to press enter. What about changing the current behaviors to having 2 config flags that can be optionally enabled to fire callbacks on facet deletion and "clear all". Alternatively, we can fire the current facet deletion callback upon unfocus and not on each facet deletion.

samuelclay commented 12 years ago

Agreed. Deployed.