Hi there,
I am trying to implement my own task filter (as instructed viewtopic.php?f=44&t=10511&p=57156&hilit=custom+Filter+tasks#p57156). Unfortunately, although the tasks filter out correctly, it also causes an unnecessary backend request to change parentIndex.
What is the correct way to prevent this particular synchronization?
My code
onFilterChange({
value
}) {
if (value === '') {
this.gantt.taskStore.clearFilters();
} else {
value = value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
this.gantt.taskStore.filter({
filters: task => task.name && task.name.match(new RegExp(value, 'i')),
replace: true
});
}
}
Sample sync request
{"type":"sync","requestId":16134731395332,"revision":null,"tasks":{"updated":[{"parentIndex":1,"id":"dce731ec-6d34-11eb-b699-0242ac120003"},{"parentIndex":2,"id":"dc773c78-6d34-11eb-b699-0242ac120003"},{"parentIndex":3,"id":"e141d469-6d34-11eb-b699-0242ac120003"}]}}
I was trying to use the option 'silent' - no avail...