pure-angular-advanced-searchbox
pure-angular-advanced-searchbox copied to clipboard
Enter key is not working
Hi Tyler,
It is expected the "search" action to be fired on Enter key but it's not. Beside, the search icon (magnifier) hides after typing which makes it not possible to click the button by mouse as well. Are you experiencing such things at your side?
Magnifier is not clickable actually, and only disappears when there is filters or a query filled in. I can make the magnifier available via an configuration option which I'll provide.
Enter key functionality is not available yet but I'll make it fire on enter. Thank you for the suggestion!
I plan to provide more keyboard functionality
Enter key now works in v1.1.75; I also added a configuration property showMagnifierAlways which can be enabled via configuration to always show the search "magnifier"; you can click this now to perform a search action.
Dear Tyler, It throws an error: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element' from this code:
getStyle: function (elem, style) {
return parseInt($window.getComputedStyle(elem, null).getPropertyValue(style));
},
And the icon is overlapped by that of "remove filters" icon. Thnx
When are you getting this error @IbrahimHd? I cannot reproduce this; can you give me some steps?
Thanks!
I think this might be fixed now, I'm not sure where you encountered it; but it should dewrap the angular element now if it's wrapped.
I'm getting this error (mentioned above) just after start typing a single letter. Unfortunately this error is still arise even with v1.1.77.
What browser are you using? I've tried IE9+, Chrome, FF; still not seeing this issue after typing a single letter into the query field.
I'm putting the searchBox inside ng-view, and some other dependents are being injected to the main module (some stusff like: Calendar, DateRangePicker, ui.grid, Chart). Once the the searchBox moved to a separate module (alone with no other functionality) it works well. Most probably there is a conflict with other JS plugin/library.
Actually nothing happens when "Enter" key is pressed or the search button is clicked, I have 2 questions:
1. How can the destination URL be specified? (that URL the search query needs to be sent to)
2. How can I see the data of the search request? as mentioned in the Readme:
The searchbox will return data in JSON format and look something like: {
"filters":[
{
"condition":"contains", "value":"NK", "name":"vendor_abbr", "$$timestamp":1468518875834, "$$modified":1468518875834 }, {
"condition":"contains", "value":"Yellow", "name":"color", "$$timestamp":1468518875834, "$$modified":1468518875834, "$$operator":"AND" } ], "operators":[
"AND" ], "query":"Nike Flex" }
Thanks in advance!