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

need to be blank for [search][value] after remove the filter #328

Closed
BAndy18ru opened this issue Jul 6, 2016 · 7 comments
Closed

need to be blank for [search][value] after remove the filter #328

BAndy18ru opened this issue Jul 6, 2016 · 7 comments

Comments

@BAndy18ru
Copy link

Hi, great job!

I just found this and simple tested)
Filters not removed properly after X button.
It happen on Date and Range of numbers filters, "-yadcf_delim-" sended to the server

Also, can you pls add to the code minimized version of JS.

Thanks

@vedmack
Copy link
Owner

vedmack commented Jul 21, 2016

If you'll provide a link to a test case (using my local yadcf copy) I will be able to fix it much quicker

@louking
Copy link
Contributor

louking commented Aug 6, 2016

I see similar in http://yadcf-showcase.appspot.com/server_side_source.html where on initial load columns[4][search][value] is empty, but after moving slider, then clearing with X columns[4][search][value] becomes 0-yadcf_delim-134. Of course, server side can be built to handle -yadcf_delim- equivalent to empty value, equivalent to full range...

@louking
Copy link
Contributor

louking commented Aug 6, 2016

Just determined the issue originally reported by @BAndy18ru happens with a date_range filter, and can be reproduced in http://yadcf-showcase.appspot.com/server_side_source.html

@true-gler
Copy link

same here in select2

after removing entries the input field (with [x] or with backspace) is not cleared properly (or connection in regexp remains)
Got error 'empty (sub)expression' from regexp

LOWER(`table`.`field`) REGEXP |filterString)

after

yadcf.doFilter('clear', '-table', 24); 

the input is cleared and its working again

@vedmack
Copy link
Owner

vedmack commented Dec 13, 2016

@louking , can you please write down a simple flow with expected / actual result so I can understand whats not working as expected? I tried to reset the range date with [X], and it sends -yadcf_delim- to server which is fine, so please elaborate

@vedmack vedmack reopened this Dec 13, 2016
@louking
Copy link
Contributor

louking commented Dec 13, 2016

Follow these steps with http://yadcf-showcase.appspot.com/server_side_source.html

  1. clear Engine filter with X (just to see values for Just a Date and Just a Number)

columns[3][search][value] is empty
columns[4][search][value] is empty

  1. pick a date in Just a Date: To

columns[3][search][value]: -yadcf_delim-12/13/2016

  1. clear Just a Date filter with X

columns[3][search][value]: -yadcf_delim- - this may be valid but I think most people would expect this to be empty as the state is the same as after item 1

  1. pick a number for Just a Number To

columns[4][search][value]: 0-yadcf_delim-131

  1. clear Just a Number filter with X

columns[4][search][value]: 0-yadcf_delim-134 - this is is interesting as why isn't this empty or -yadcf-delim-?

Frankly, I don't have a problem with this behavior and have coded around it. Having said that, I think it would be more intuitive when the filter is cleared to have the search value go back to the same state as it was before it was ever used (empty)

@vedmack
Copy link
Owner

vedmack commented Jan 27, 2017

fixed in 0.9.2.beta.4

@vedmack vedmack closed this as completed Jan 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants