Skip to content
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

Clearing Number Range Filter #276

Closed
JohnHanks opened this issue Jan 9, 2016 · 5 comments
Closed

Clearing Number Range Filter #276

JohnHanks opened this issue Jan 9, 2016 · 5 comments

Comments

@JohnHanks
Copy link

Uncaught TypeError: Cannot read property 'replace' of undefined
rangeClear  @   jquery.dataTables.yadcf.js:2716
onclick @   Devices.cfml:1

sometimes I get this error when I try to clear the number range filter.
the onclick is me clicking the number range filter reset x button.

the filter doesn't clear usually unless I click another text input before clicking the x button.

and what I just wrote, doesn't always work the first time, or the second time...

in short, the behavior is very sporadic, i can't quite quantify what is happening.

i will attempt to fiddle this. if i cannot, i may need to give you login access to our app, if you are not opposed 😄

btw using latest beta35 ver.

@vedmack
Copy link
Owner

vedmack commented Jan 12, 2016

Are you sure you are using the 0.8.9.beta.35 , because there is no repalce usage at the mentioned lien of code, see here line 2716, if you are sure about the line of code/yadcf version please provide the link to your sire, otherwise let me know about the right version/line of code

@JohnHanks
Copy link
Author

oops!

line 2706 is the actual line

@JohnHanks
Copy link
Author

On further investigation, I think I have found at least one culprit. I have a span inside of my button (so that I can use the glyphicon-remove icon instead of an ASCII "X") and if I click on the span (the X) I get the console error logged. If I click on the button space that does not include the span (like close to the edge/corner) then the filter clears as it should. Maybe this has to do with the event.target portion of code in that line.

I noticed separately also that a bunch of divs are getting created with id="yadcf-filter-wrapper--filter_div_#" where # can be all of my columns (lets say 7,8,9) and appended after the first div with id="yadcf-filter-wrapper--filter_div_#" that has the inputs inside of it being filtered. These divs are being created when I type in any of my range number filter boxes and also when I clear my filter successfully (clicking the button, but not the span in the button).

vedmack added a commit that referenced this issue Jan 13, 2016
@vedmack
Copy link
Owner

vedmack commented Jan 13, 2016

I changed the way I'm getting the column number in that function, and that should work for all types of reset buttons of a range filter, grab the lateset version 0.8.9.beta.37 , if you will bump into similar cases let me know in this issue.

@vedmack vedmack closed this as completed Jan 13, 2016
@JohnHanks
Copy link
Author

I see that the error went away in the console, but the same applies. No ability to trigger my button, and the extra divs are there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants