pure-angular-advanced-searchbox icon indicating copy to clipboard operation
pure-angular-advanced-searchbox copied to clipboard

Enter key is not working

Open IbrahimHd opened this issue 8 years ago • 8 comments

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?

IbrahimHd avatar Jul 15 '16 13:07 IbrahimHd

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

tybeck avatar Jul 15 '16 23:07 tybeck

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.

tybeck avatar Jul 18 '16 15:07 tybeck

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

IbrahimHd avatar Jul 19 '16 07:07 IbrahimHd

When are you getting this error @IbrahimHd? I cannot reproduce this; can you give me some steps?

Thanks!

tybeck avatar Jul 20 '16 13:07 tybeck

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.

tybeck avatar Jul 20 '16 17:07 tybeck

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.

IbrahimHd avatar Jul 21 '16 09:07 IbrahimHd

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.

tybeck avatar Jul 21 '16 13:07 tybeck

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!

IbrahimHd avatar Jul 22 '16 06:07 IbrahimHd