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
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

## 1.3.12 - 2021-05-27
### Fixed

- Fixed an issue introduced in v1.3.12 where if the list view's search is not enabled, then the widget would error on any list view control widget interaction.

## 1.3.12 - 2021-05-27 [YANKED]

### Fixed

Expand Down
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.12",
"version": "1.3.13",
"description": "Search and filter Mendix list views",
"copyright": "Mendix BV",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion src/Shared/DataSourceHelper/DataSourceHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export interface DataSourceHelperListView extends mxui.widget.ListView {
__customWidgetPagingLoading: boolean;
__customWidgetPagingOffset: number;
_getSearchText?: () => string;
hasSearch: boolean;
}

export class DataSourceHelper {
Expand Down Expand Up @@ -182,7 +183,8 @@ export class DataSourceHelper {

// @ts-ignore This is a subclass property, but we also handle it gracefully if not present.
const searchPaths: string[] | undefined = this.widget._datasource._searchPaths;
const searchText: string | undefined = this.widget._getSearchText?.();
// If there is no search, trying to get it will error so first check whether search is enabled.
const searchText: string | undefined = this.widget.hasSearch ? this.widget._getSearchText?.() : undefined;

// Unfortunately the listview datasource object does not have a `_getSearchConstraints()` function of some kind,
// but rather builds it on the fly in `setSearchText(string)`. To not affect the ListView widget, we copy that part
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.12" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="ListViewControls" version="1.3.13" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="CheckBoxFilter/CheckBoxFilter.xml"/>
<widgetFile path="DropDownFilter/DropDownFilter.xml"/>
Expand Down