Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "list-view-controls",
"widgetName": "ListViewControls",
"version": "1.3.10",
"version": "1.3.11",
"description": "Search and filter Mendix list views",
"copyright": "Mendix BV",
"scripts": {
Expand Down
5 changes: 3 additions & 2 deletions src/Shared/DataSourceHelper/DataSourceHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export class DataSourceHelper {
}

private updateDataSource(callback: () => void, restoreState: boolean) {
let constraints: Constraints = [];
let constraints: Constraints;
let sorting: string[][] = Object.keys(this.store.sorting)
.map(key => this.store.sorting[key])
.filter(sortConstraint => sortConstraint[0] && sortConstraint[1]);
Expand Down Expand Up @@ -161,6 +161,7 @@ export class DataSourceHelper {
}
}

// TODO: Since we do not include `this.widget_datasource._constraints` here, this can cause filtering to reset all the constraints.
constraints = [ ...unGroupedConstraints, ...unGroupedOrConstraints, ...groupedConstraints ];

} else {
Expand All @@ -178,7 +179,7 @@ export class DataSourceHelper {
.join("")
.replace(/\[]/g, ""); // Remove empty string "[]"

constraints = unGroupedConstraints + groupedConstraints;
constraints = this.widget._datasource._constraints + unGroupedConstraints + groupedConstraints;
// if (!restoreState) {
// this.widget._datasource._sorting = sorting;
// }
Expand Down
2 changes: 1 addition & 1 deletion src/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<package xmlns="http://www.mendix.com/package/1.0/">
<clientModule name="ListViewControls" version="1.3.10" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="ListViewControls" version="1.3.11" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="CheckBoxFilter/CheckBoxFilter.xml"/>
<widgetFile path="DropDownFilter/DropDownFilter.xml"/>
Expand Down