Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
Merge pull request #648 from metasfresh/dev-645
Browse files Browse the repository at this point in the history
HOME/END keys not working in process parameter field when opened from view #645
  • Loading branch information
damianprzygodzki committed Apr 19, 2017
2 parents 2498ea6 + 058d0eb commit 8ec435a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 11 deletions.
4 changes: 3 additions & 1 deletion src/components/app/DocumentList.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ class DocumentList extends Component {
const {
windowType, open, closeOverlays, selected, inBackground,
fetchQuickActionsOnInit, isModal, processStatus, readonly,
includedView, children, isIncluded
includedView, children, isIncluded, disablePaginationShortcuts
} = this.props;

const hasIncluded = layout && layout.supportIncludedView &&
Expand Down Expand Up @@ -477,6 +477,8 @@ class DocumentList extends Component {
queryLimitHit={data.queryLimitHit}
doesSelectionExist={this.doesSelectionExist}
inBackground={inBackground}
disablePaginationShortcuts=
{disablePaginationShortcuts}
>
{layout.supportAttributes && !isIncluded &&
!layout.supportIncludedView &&
Expand Down
5 changes: 4 additions & 1 deletion src/components/table/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,8 @@ class Table extends Component {
cols, type, docId, rowData, tabid, readonly, size, handleChangePage,
pageLength, page, mainTable, updateDocList, sort, orderBy,
toggleFullScreen, fullScreen, tabIndex, indentSupported, isModal,
queryLimitHit, supportQuickInput, tabInfo, isIncluded
queryLimitHit, supportQuickInput, tabInfo, isIncluded,
disablePaginationShortcuts
} = this.props;

const {
Expand Down Expand Up @@ -825,6 +826,8 @@ class Table extends Component {
deselect={this.deselectAllProducts}
queryLimitHit={queryLimitHit}
compressed={isIncluded}
disablePaginationShortcuts=
{disablePaginationShortcuts}
/>
</div>
</div>
Expand Down
24 changes: 15 additions & 9 deletions src/components/table/TablePagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,10 @@ class TablePagination extends Component {

render() {
const {
size, pageLength, handleChangePage, page, compressed
size, pageLength, handleChangePage, page, compressed,
disablePaginationShortcuts
} = this.props;

const pages = size ? Math.ceil(size / pageLength) : 0;

let pagination = [];
Expand Down Expand Up @@ -262,14 +264,18 @@ class TablePagination extends Component {
</div>
</div>

<PaginationContextShortcuts
handleFirstPage={() => handleChangePage(1)}
handleLastPage={() => handleChangePage(
size ? Math.ceil(size / pageLength) : 0)
}
handleNextPage={() => handleChangePage('up')}
handlePrevPage={() => handleChangePage('down')}
/>
{
!disablePaginationShortcuts &&
<PaginationContextShortcuts
handleFirstPage={() => handleChangePage(1)}
handleLastPage={() => handleChangePage(
size ? Math.ceil(size / pageLength) : 0)
}
handleNextPage={() => handleChangePage('up')}
handlePrevPage={() => handleChangePage('down')}
/>

}
</div>
);

Expand Down
2 changes: 2 additions & 0 deletions src/containers/DocList.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ class DocList extends Component {
inBackground={rawModal.visible}
fetchQuickActionsOnInit={true}
processStatus={processStatus}
disablePaginationShortcuts=
{modal.visible || rawModal.visible}
/>
</Container>
);
Expand Down

0 comments on commit 8ec435a

Please sign in to comment.