Please provide an example of how to create excelFilter
filters based on the formatted text of a column, rather than the raw values. Currently, excelFilter
filters based on the raw values, which results in duplicates in the multiselect list of the filter. We understand that excelFilter
is based on the Filter UI as described here: Webix Filter UI Documentation.
Hello @Evoxdev_Apps,
A filter can collect options and filter only the raw data, while the format/template is used only for visualization. If you need to filter by formatted values, it is better to create them in the data via scheme:
scheme:{
$init:function(obj){
obj.date = new Date(obj.year, 0);
obj.status = obj.date < old ? "old" : "new";
}
}
Please, check out the snippet: Code Snippet
We don’t want to update data since we need to use it in backend.
However i already did a trick in the list component inside the filter, how i can access the multiselect list inside a Query view? Code Snippet
The Query and most of our complex widgets (except Kanban and Spreadsheet) are built as modularized apps on Webix Jet, and the user can customize existing modules or add new ones.
Modules are implemented as JetViews (ES6 classes) where any UI element, data-related service, or feature can be customized by the same rules. For more details about this architecture, please check the following blog article, which describes the general idea and reasons for this structure.
Please note that complex modifications may require observing the source code of the tool in order to build the most feasible solution that will correctly alter/extend the original logic.
In order to determine how to customize the area you need, you can use the Query View Class Map. The filter itself can be customized through the view of the same name: Code Snippet
At the end you need to replace default view and service via the override map:
override: new Map([
[query.views.filter, Filter]
])
If you need to customize another part of the widget, you can also use the Class Map.