Skip to content

Commit

Permalink
Merge pull request #84 from mendix/fix/sorting-after-page-close
Browse files Browse the repository at this point in the history
Fix/sorting after page close
  • Loading branch information
mmehmetAliIzci committed Jan 8, 2021
2 parents ba2454b + 2a32cd7 commit e1cfe0b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
3 changes: 1 addition & 2 deletions package.json
@@ -1,7 +1,7 @@
{
"name": "list-view-controls",
"widgetName": "ListViewControls",
"version": "1.3.9",
"version": "1.3.10",
"description": "Search and filter Mendix list views",
"copyright": "Mendix BV",
"scripts": {
Expand Down Expand Up @@ -93,7 +93,6 @@
"raw-loader": "^4.0.0",
"react": "^16.8.4",
"react-dom": "^16.8.4",
"react-hot-loader": "^4.12.19",
"react-test-renderer": "^16.8.4",
"remap-istanbul": "^0.13.0",
"sass-loader": "^8.0.2",
Expand Down
11 changes: 7 additions & 4 deletions src/Pagination/components/PaginationContainer.ts
@@ -1,5 +1,4 @@
import { Component, ReactChild, ReactNode, createElement } from "react";
import { hot } from "react-hot-loader";

import * as classNames from "classnames";
import * as dojoAspect from "dojo/aspect";
Expand All @@ -11,8 +10,12 @@ import { DataSourceHelper, DataSourceHelperListView } from "../../Shared/DataSou

import {
getTranslations,
hideLoadMoreButton, mxTranslation, persistListViewHeight,
resetListViewHeight, setListNodeToEmpty, showLoadMoreButton
hideLoadMoreButton,
mxTranslation,
persistListViewHeight,
resetListViewHeight,
setListNodeToEmpty,
showLoadMoreButton
} from "../utils/ContainerUtils";

import { ModelerProps } from "../Pagination";
Expand Down Expand Up @@ -281,4 +284,4 @@ class PaginationContainer extends Component<ModelerProps, PaginationContainerSta

}

export default hot(module)(PaginationContainer);
export default PaginationContainer;
3 changes: 2 additions & 1 deletion src/Shared/DataSourceHelper/DataSourceHelper.ts
Expand Up @@ -47,7 +47,8 @@ export class DataSourceHelper {
aspect.after(widget, "storeState", (store: (key: string, value: any) => void) => {
logger.debug("after storeState");
if (widget.__customWidgetDataSourceHelper) {
store("lvcSorting", widget.__customWidgetDataSourceHelper.sorting);
const sorting = widget.__customWidgetDataSourceHelper.sorting && widget.__customWidgetDataSourceHelper.originalSort;
store("lvcSorting", sorting);
store("lvcConstraints", widget.__customWidgetDataSourceHelper.constraints);
store("lvcPaging", widget.__customWidgetDataSourceHelper.paging);
}
Expand Down
2 changes: 1 addition & 1 deletion src/package.xml
@@ -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.9" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="ListViewControls" version="1.3.10" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="CheckBoxFilter/CheckBoxFilter.xml"/>
<widgetFile path="DropDownFilter/DropDownFilter.xml"/>
Expand Down

0 comments on commit e1cfe0b

Please sign in to comment.