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

Exclude filter bug -- If exclude filter is selected for column1, it automatically performance exclude filter for other columns. #264

Closed
GMEHTA1981 opened this issue Dec 2, 2015 · 6 comments

Comments

@GMEHTA1981
Copy link

This is a screenshot of the grid.
Steps:

  1. I search a column with value 'JAX' -- works fine. It will filter records with JAX
    346a9638-98ef-11e5-9ab8-751a2e09d9ba

  2. I add a search criteria, in another column. Origin column search 'DTW' -- works fine. It will filter records with DTW (in origin) and JAX (in Station)
    image

  3. Now I want to exclude records.
    I want to exlude all records with station 'JAX' and include records with origin 'DTW'
    image

If you see the results in screenshot 3, it excluded all station with 'JAX' and also performed the exclude function to other criteria.
So, now I have result that excludes 'JAX' in station and excludes 'DTW' in Origin column
image

@vedmack
Copy link
Owner

vedmack commented Dec 2, 2015

first image link is broken - please edit your question with a proper link (edit it - no need to post more comments)

@GMEHTA1981
Copy link
Author

Daniel.. first image is uploaded. Please provide a fix for this issue.. its causing business issue

@vedmack
Copy link
Owner

vedmack commented Dec 8, 2015

as usual im lack of free time... will take a look at it whenver I can, untill then, consider sending a PR with a fix, its an open source code you can allways modify / improve/ fix... nothing too complicated there...

@vedmack
Copy link
Owner

vedmack commented Dec 9, 2015

@GMEHTA1981 , can it be that you are using serverSide logic in your datatables, and that logic had some bugs in it? because it works just fine for me, see the following example.
Update me with your conclusions.

@vedmack vedmack changed the title EXCLUDE FILTER BUG -- If exclude filter is selected for column1, it automatically performance exclude filter for other columns. Exclude filter bug -- If exclude filter is selected for column1, it automatically performance exclude filter for other columns. Dec 9, 2015
@GMEHTA1981
Copy link
Author

I found the bug.
Inside the function exFilterColumn
inside case "date":
if (filter_value !== undefined && filter_value.indexOf('exclude') !== -1) {
exclude = true;
filter_value = filter_value.replace('exclude', '');
}
else { exclude = false; } //NEEDED ELSE CONDITION.

@vedmack
Copy link
Owner

vedmack commented Dec 12, 2015

Thanks for pointing out to the bug, fixed it by setting it to false inside thte begining of the loop
Fixed in 0.8.9.beta.27 grab it and see how it works for you.

@vedmack vedmack closed this as completed Dec 12, 2015
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