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

Cumulative filters / disabling fitlers #196

Closed
jcolls opened this issue May 12, 2015 · 7 comments
Closed

Cumulative filters / disabling fitlers #196

jcolls opened this issue May 12, 2015 · 7 comments

Comments

@jcolls
Copy link

jcolls commented May 12, 2015

At the moment if you apply a filter on one column and then apply a filter on a different column it is easy to get a "no results" message. This is because the selected filters work in collaboration. Which is useful in its own right.

It would be good to have the option though to be able to set the filters to work individually of one another.

It would also be a nice feature on either method to have the ability to style the filter results differently based on if they will return results or not (in the displayed column after the first filter). This could then give the opportunity to give the appearance of being disabled so that the user is aware.

@vedmack
Copy link
Owner

vedmack commented May 26, 2015

Please give an small example/scenario in with that kind of a filter

@RRaylion
Copy link

I think you would need a check box like the exclude to make this work

filters are by default and --example: I want teachers with this name AND live in this state
but using the datatables api it is a lot harder to implement even with the regex filters --
--example: I want teachers with this name OR live in this state

I would love to see the code that gets this to work and doesn't blow up large data sets

I would imagine a select filter

UPDATE:
scenerios is it possible ?? -- reasoning:

table: teacher name | age | state | salary | favorite tree

filter request: age > 25 AND state: FL
(easy -- how it currently works)

filter request: age > 25 OR state: FL
( harder: because you have to account for overlap - i think DT will take care of it for you )

filter request: age > 25 OR state:{ FL , CA } AND salary > 100k
-- this requires three copies of the result sets to be merged together the regex is not that bad but i just don't think DT can do it - but that's just me

@jcolls
Copy link
Author

jcolls commented Jun 1, 2015

Hi there,

As an example, if you take a look at another datatables filter widget
http://cyberhobo.github.io/column-filter-widgets-examples/extras/ColumnFilterWidgets/index.html

You'll see that if you filter by the first column (Rendering Engine) and choose for example 'Trident' the other filters are updated to only include the applicable filters from the remaining table data. Further to this if you narrow the results so that there is a single row then the other filters are disabled. This I think reduces the chances of users ending up with no results because of conflicting filters.

I was suggesting an option for YADCF to work a similar way to the above. But with an additional option that would return the full data in the columns but give the results a class, allowing styling, dependent if they are in the filtered table or in the original dataset. This would show the users the full filters possible but highlight the ones that would return results.

I would imagine that this feature would be best at table level rather than individual filter level as it would confuse users if it was random so I do not think a checkbox like the exclude option would help much.

@RRaylion
Copy link

RRaylion commented Jun 1, 2015

Wow I was totally thinking in the wrong direction...

@vedmack
Copy link
Owner

vedmack commented Aug 14, 2015

Take a look at the cumulative_filtering.html

@jcolls
Copy link
Author

jcolls commented Aug 14, 2015

That is great Daniel. Appears to work perfectly from what I can see. Thank
you.

On Fri, 14 Aug 2015 at 08:44 Daniel Reznick notifications@github.com
wrote:

Take a look at the cumulative_filtering.html
https://dl.dropboxusercontent.com/u/55621125/yadcf/war14/cumulative_filtering.html


Reply to this email directly or view it on GitHub
#196 (comment).

@vedmack
Copy link
Owner

vedmack commented Aug 20, 2015

Added in 0.8.9.beta.13, read updated docs / see new showacse page

@vedmack vedmack closed this as completed Aug 20, 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

3 participants