-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for single-document collections #762
Conversation
A point for discussion: I removed the "Delete" button, because it didn't make much sense here, but maybe there should be something like "clear all fields" button? |
return collection.slug === params.collection | ||
}) | ||
|
||
const isNewDocument = /\/new(\/|$)/.test(path) && !params.documentId |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ohmoses is there ever a case where checking for params.documentId
is not enough to determine whether we're creating a new document?
Closes #584
If
settings.publish.isSingleDocument
is set totrue
in the collection schema, Publish will show the document editor (instead of the document list) on route/collectionName
(or/groupName/collectionName
). If there are multiple documents in the collection, Publish will operate on the first one.I made a small change to enable
connectRedux
to accept amapState
function, so that inReferenceSelectView
,DocumentListView
, andDocumentEditView
, I could move the logic for creatingcontentKey
s,documentId
, etc., tomapState
and pass them to the components.