I want to customize the filter criteria, but that doesn't seem to work
Do I need to add eventStore, and how do I introduce eventStore
tbar: [
{ type : 'taskfilterfield' },
// Field for filtering columns
// { type : 'columnfilterfield' },
// Field for filtering swimlanes
{ type : 'swimlanefilterfield' },
// Move the last items to the right
'->',
{
type: 'filterfield',
filterFunction : (record, value) => {
console.log(value)
return record.text.includes(value);
}
}
// Button to pick which columns are shown
// { type : 'columnpickerbutton' },
// Button to pick which swimlanes are shown
// { type : 'swimlanepickerbutton' }
],
const taskBoard = new TaskBoard({
... other configurations
tbar : [
... other tbar configurations
{
type : 'filterfield',
placeholder : 'Highlight tasks',
onChange : ({ value }) => {
const filter = value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
taskBoard.project.eventStore.filter({
id : 'eventNameFilter',
// Filtering by name property
filterBy : event => event.name.match(new RegExp(filter, 'i'))
});
}
}
]
Also with that configuration that I shared,
this.taskboard.project.eventStore.clearFilters()
worked correctly
When I click, the page will be stuck for a long time, probably because of the large amount of data (about 100 pieces of data), which will not happen if the amount of data is small