Closed tliebig closed 8 years ago
You can use didSearch
method and made everything what you want:
didSearch: function(search_phrase) {
console.log(search_phrase);
}
Hi Torsten, use didSearch method proposed by Alex to mutate URL as you wish
Worked great, thx.
How about the other way around - pick a the search phrase from the url, and execute the search. I am able to do the first, but I cannot execute the search afterwards.
I've tried triggering the keyup event on the searchInput, as well as triggering the change event, but to no avail. Couldn't find anything in the docs as well.
Could anyone point me in the right direction?
@tliebig Take a look http://codepen.io/NeXTs/pen/yYxazx?editors=101
@NeXTs Works like a charm, thanks!
Hey Den,
would it be possible to incorporate html5 PushState to add the search string to the url? I've been using this to deeplink to search results with dynatable.js, which is quite handy: Just copy the URL after searching and share it via email to point other users to solutions within larger databases.
This is how dynatable.js does it: http://www.dynatable.com/#pushstate