Filtering down to two groups or more (Scheduler)
3 years ago.
Hi, I hope you can help.
Our development application is currently being beta tested and I have a request I can't solve.
I'm using the following code to filter groups, displaying all of the resources associated with the filtered group.
This works fine for filtering down to a single group. Is there a method of filtering down to two groups, or more?
Thank you.
Filter:
onRowFilter: (args) => {
const query = args.filterParam.query;
if (args.row.name.toUpperCase().indexOf(query.toUpperCase()) === -1) {
args.visible = false;
}
var parent = args.row.parent();
if (parent && !parent.hiddenUsingFilter) {
args.visible = true;
}
},
App:
const app = {
elements: {
filter: document.querySelector("#filter"),
},
filter() {
// see dp.onRowFilter above
dp.rows.filter({
query: app.elements.filter.value,
});
},
init() {
app.elements.filter.addEventListener("change", function() {
app.filter();
});
}
};
app.init();
HTML:
<div class="search">
<select class="catsearch" id="filter">
<option value="">Select to Filter Operator</option>
<option value="">All Operators</option>
<option value="Bead Blast">Bead Blast</option>
<option value="Polishing">Polishing</option>
<option value="Staff Member 01">Staff Member 01</option>
// 30 more members of staff included below Staff Member 01
</select>
DayPilot

