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 #464 from metasfresh/dev-297
Browse files Browse the repository at this point in the history
Dev 297
  • Loading branch information
damianprzygodzki committed Mar 2, 2017
2 parents a8cf083 + 1b77937 commit 258389c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/components/app/DocumentList.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class DocumentList extends Component {
const {data} = this.state;
// When the rows are changing we should ensure
// that selection still exist
return (data && data.size && selected[0] &&
return (data && data.size && data.result && selected[0] &&
getItemsByProperty(
data.result, 'id', selected[0]
).length
Expand Down Expand Up @@ -348,7 +348,7 @@ class DocumentList extends Component {
<QuickActions
windowType={windowType}
viewId={viewId}
selected={selectionValid && selected}
selected={selectionValid ? selected : undefined}
refresh={refresh}
shouldNotUpdate={inBackground}
fetchOnInit={fetchQuickActionsOnInit}
Expand Down Expand Up @@ -400,7 +400,7 @@ class DocumentList extends Component {
<SelectionAttributes
refresh={refresh}
setClickOutsideLock={this.setClickOutsideLock}
selected={selectionValid && selected}
selected={selectionValid ? selected : undefined}
shouldNotUpdate={
inBackground
}
Expand Down
4 changes: 3 additions & 1 deletion src/components/app/QuickActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ class QuickActions extends Component {

fetchActions = () => {
const {dispatch, windowType, viewId, selected} = this.props;
dispatch(quickActionsRequest(windowType, viewId, selected)).then(response => {
dispatch(
quickActionsRequest(windowType, viewId, selected)
).then(response => {
this.setState({
actions: response.data.actions
})
Expand Down

0 comments on commit 258389c

Please sign in to comment.