Skip to content

Commit

Permalink
fix(react-grid): fix incorrect initial options handling (#797)
Browse files Browse the repository at this point in the history
  • Loading branch information
kvet authored Mar 2, 2018
1 parent b409c11 commit 1220664
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/dx-react-grid/src/plugins/paging-state.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class PagingState extends React.PureComponent {

this.state = {
currentPage: props.currentPage || props.defaultCurrentPage,
pageSize: props.pageSize || props.defaultPageSize,
pageSize: props.pageSize !== undefined ? props.pageSize : props.defaultPageSize,
};

const stateHelper = createStateHelper(
Expand Down
4 changes: 2 additions & 2 deletions packages/dx-react-grid/src/plugins/paging-state.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ describe('PagingState', () => {
propertyName: 'currentPage',
defaultDeps,
values: [
0,
1,
2,
3,
],
actions: [{
actionName: 'setCurrentPage',
Expand All @@ -39,9 +39,9 @@ describe('PagingState', () => {
propertyName: 'pageSize',
defaultDeps,
values: [
0,
1,
2,
3,
],
actions: [{
actionName: 'setPageSize',
Expand Down

0 comments on commit 1220664

Please sign in to comment.