This project is read-only.

Request: Dependant filters

Feb 7, 2014 at 2:12 PM
Hi,

would it be possible to include the option to have the available filter values dependant on what has been filtered so far?
For example if you filter for one "Area", would it be possible to update the values that are now possible for for example "Level" ?

I know this is not as easy as it sounds but sometimes it would be very useful!

Thanks in advance for an answer!
Feb 7, 2014 at 4:02 PM
Hi,

This is an excellent idea. I'll be working on it.

I am bit worried about performance. Anyway, if it is slow, I'll put it as an option.

Thank you for the suggestion, much appreciated.
Feb 12, 2014 at 1:13 PM
Edited Feb 12, 2014 at 1:13 PM
Hi,

I posted a first version with this feature. Please tell me if this is what you need.

There are a couple of UI glitches, that I'll fix, of course.

(as a beta, it must be taken from the downloads section, rather than the home page)
Feb 12, 2014 at 3:17 PM
Wow, did not expect an answer as fast as that :-)

Tried it out, that is exactly what I meant!

Thanks a lot!

How do you solve it internally? I've skimmed over the code of a previous version and would be interested in the changes
Feb 12, 2014 at 3:25 PM
Edited Feb 12, 2014 at 3:33 PM
Great, thanks for trying it out.

I'll fix the UI issues and post a release version soon.

The list of choices in the drop-down filters are in a list of FilterChoice classes. I added a Visibility property to this class.
Internally, when the list of displayed lines is filtered, I recompute all available categories/areas/levels/events/processes. This gives me the available data. Then I go over the list of FilterChoices and set the Visibility property: if the user unchecked an item, it is forced visible; otherwise it is shown only if it appears in the newly-computed available data.
The template for showing FilterChoice has been updated to take into account the Visibility property.

Small changes, actually.

I have posted the source code of beta 1.
Feb 19, 2014 at 10:24 PM
Stable version has been released.

Enjoy :-)
Marked as answer by roqz on 3/24/2014 at 2:56 AM