Filter only after pressing ENTER
Filter only after pressing ENTER
trongart
Posts: 222Questions: 51Answers: 0
The default search filter shows results real-time "as you type". Is it possible to stop this function and to only filter and show results after the user presses ENTER? Would this also apply to filters from the SearchBuilder?
This question has an accepted answers - jump to answer
Answers
The following code activates search only after the input has been typed in and ENTER was pressed, which is what I was looking for:
However, this does not work with the SearchBuilder. It still searches at every keystroke. How could I apply the same to the SearchBuilder?
Hi @trongart ,
This is possible for SearchBuilder, but you would have to make a bunch of custom conditions to do it. We think that this is a good idea though so I am going to add an initialisation option for it. (For my reference, the issue to track this will be DD-1958) I'll report back here when this is done, shouldn't be too long!
Thanks,
Sandy
Hi @trongart ,
I've added a new Initialisation option
searchBuilder.enterSearch
, if you set it to true in your initialisation then a search will only be triggered in an input element when you press enter. Take a look at this example to see it in action.This will be available in the next SearchBuilder release which we hope will be in the next few weeks. Until then you can access the fix from the nightly builds.
Thanks,
Sandy
Amazing- This works, thank you so much for this!
The night build version also fixed that the Chinese IME does not work for the value input field.
Awsome Work!!!!
Thank You ^_^
Dear @sandy
Thanks for the awsome project.
There is a pull request is about add a div element into logic button.
It's giving a chance to ro rotate text.
Please take a look at this example to see the effect
and then review the pull request in the github.
Thanks again!
Timothy
Hi @timothy_chi ,
I've replied and pulled in your PR on GitHub.
Thanks for contributing!
@sandy The searchBuilder.enterSearch no longer works with this nighty build, also not in the example. Has there been an update to the nighty build?
Hi @trongart ,
I'm just about to finish up for today but I'll take a look first thing tomorrow morning.
Thanks,
Sandy
Sure, thank you very much for checking @sandy !
Hi @trongart ,
That should be fixed again now, you may need to break the cache on the url in your script tag (just add "?adfbg" to the end).
Thanks again for pointing this out,
Sandy
Works again! Appreciate your help @Sandy