Fix delete button after removing workflow
This commit is contained in:
parent
4a11034de9
commit
db7f75ccd3
@ -23,7 +23,7 @@ import {
|
|||||||
} from '../../actions/entries';
|
} from '../../actions/entries';
|
||||||
import { loadScroll, toggleScroll } from '../../actions/scroll';
|
import { loadScroll, toggleScroll } from '../../actions/scroll';
|
||||||
import { selectEntry } from '../../reducers';
|
import { selectEntry } from '../../reducers';
|
||||||
import { selectFields } from '../../reducers/collections';
|
import { selectFields, selectAllowDeletion } from '../../reducers/collections';
|
||||||
import { history, navigateToCollection, navigateToNewEntry } from '../../routing/history';
|
import { history, navigateToCollection, navigateToNewEntry } from '../../routing/history';
|
||||||
import { Loader } from '../../ui';
|
import { Loader } from '../../ui';
|
||||||
import confirm from '../UI/Confirm';
|
import confirm from '../UI/Confirm';
|
||||||
@ -365,6 +365,7 @@ function mapStateToProps(state, ownProps) {
|
|||||||
const scrollSyncEnabled = scroll.isScrolling;
|
const scrollSyncEnabled = scroll.isScrolling;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
showDelete: !ownProps.newEntry && selectAllowDeletion(collection),
|
||||||
collection,
|
collection,
|
||||||
collections,
|
collections,
|
||||||
newEntry,
|
newEntry,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user