forked from ringcentral/slate
-
Notifications
You must be signed in to change notification settings - Fork 199
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
Feature: add an "x"-button to clear the search box #749
Labels
Comments
You can see part of my attempt to do this here. The functional parts are there, it just needs some cleanup. |
Hi any news on that? |
A quick feaute impel I used here - https://squiss-ts.pruvo.com is as follow:
function bind() {
content = $('.content');
searchResults = $('.search-results');
function inputCallback(e) {
var wait = function() {
return function(executingFunction, waitTime){
clearTimeout(timeoutHandle);
timeoutHandle = setTimeout(executingFunction, waitTime);
};
}();
wait(function(){
search(e);
}, searchDelay );
}
$('#input-search').on('search',inputCallback);
$('#input-search').on('keyup',inputCallback);
}
<div class="search">
<input type="search" class="search" id="input-search" placeholder="Search">
</div>
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So many search fields these days come with a little "x" button in or around them (so you don't have to refocus the search field, then backspace the search string) that I naturally expected it in the search field on Slate as well. I think it would a nice and intuitive addition if that were to actually exist.
The text was updated successfully, but these errors were encountered: