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 #699 from metasfresh/dev-682
Browse files Browse the repository at this point in the history
#682 Sidelist nav stick to top
  • Loading branch information
damianprzygodzki committed Apr 28, 2017
2 parents 1255d3e + d99bfb3 commit 3890155
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 15 deletions.
10 changes: 9 additions & 1 deletion src/assets/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ body {
overflow-x: hidden;
}

.order-list-body{
margin-top: 41px;
}

@media (max-width: $breakpoint) {
.order-list-panel {
width: 100%;
Expand Down Expand Up @@ -182,7 +186,11 @@ body {
}

.order-list-nav {
width: 100%;
position: fixed;
z-index: 201;
width: 472px;
background: #fff;
top: 55px;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
Expand Down
16 changes: 5 additions & 11 deletions src/components/app/DocumentList.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class DocumentList extends Component {
}

componentDidMount = () => {
this.mounted = true;
this.mounted = true
}

componentWillUnmount() {
Expand Down Expand Up @@ -426,7 +426,7 @@ class DocumentList extends Component {
windowType, open, closeOverlays, selected, inBackground,
fetchQuickActionsOnInit, isModal, processStatus, readonly,
includedView, children, isIncluded, disablePaginationShortcuts,
notfound, disconnectFromState
notfound, disconnectFromState, autofocus
} = this.props;

const hasIncluded = layout && layout.supportIncludedView &&
Expand Down Expand Up @@ -513,15 +513,9 @@ class DocumentList extends Component {
cachedSelection : selected}
queryLimitHit={data.queryLimitHit}
doesSelectionExist={this.doesSelectionExist}
disconnectFromState={disconnectFromState}
isIncluded={isIncluded}
isModal={isModal}
disablePaginationShortcuts={
disablePaginationShortcuts}
inBackground={inBackground}
closeOverlays={closeOverlays}
open={open}
page={page}
{...{isIncluded, disconnectFromState, autofocus,
open, page, closeOverlays, inBackground,
disablePaginationShortcuts, isModal}}
>
{layout.supportAttributes && !isIncluded &&
!hasIncluded &&
Expand Down
9 changes: 6 additions & 3 deletions src/components/header/SideList.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class SideList extends Component {

renderBody = () => {
const {
open, windowType, closeOverlays, closeSideList, isSideListShow,
windowType, closeOverlays, closeSideList, isSideListShow,
docId, pagination, sorting, viewId
} = this.props;

Expand All @@ -60,7 +60,8 @@ class SideList extends Component {
}
selected={[docId]}
disconnectFromState={true}
{...{open, windowType, closeOverlays, closeSideList,
autofocus={true}
{...{windowType, closeOverlays, closeSideList,
isSideListShow}}
/>
case 1:
Expand Down Expand Up @@ -127,7 +128,9 @@ class SideList extends Component {
}
</div>)}
</div>
{this.renderBody()}
<div className="order-list-body">
{this.renderBody()}
</div>
</div>
</div>
)
Expand Down
4 changes: 4 additions & 0 deletions src/components/table/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ class Table extends Component {

componentDidMount(){
this.getIndentData(true);

const {autofocus} = this.props;

autofocus && this.table.focus();
}

componentDidUpdate(prevProps, prevState) {
Expand Down

0 comments on commit 3890155

Please sign in to comment.