search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Filter by Group

Asked by Andrew
4 years ago.

Is there a way to filter by Group and keep all of the Resources along with it? For example, if I have two Groups (Group 1 and Group 2), and Group 1 has Resource 1 and Group 2 has Resource 2. If I type in "Group 1" into the filter I still want to be able to see Resource 1.

Thank you

Answer posted by Dan Letecky [DayPilot]
4 years ago.

Yes, this is possible:

dp.onRowFilter = function(args) {
    if (args.row.name.toUpperCase().indexOf(args.filter.toUpperCase()) === -1) {
        args.visible = false;
    }
    var parent = args.row.parent();
    if (parent && !parent.hiddenUsingFilter) {
      args.visible = true;
    }
};

It requires version 2019.3.3985 (or higher) which adds support for hiddenUsingFilter:
https://javascript.daypilot.org/daypilot-pro-for-javascript-2019-3-3985/

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.