enhancement(collections): use identifier field in collections view (#2058)

This commit is contained in:
Shawn Erquhart 2019-02-19 16:14:37 -05:00 committed by GitHub
parent 518f6fb1c0
commit 49195fdb1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,6 +121,9 @@ export const selectIdentifier = collection => {
);
};
export const selectInferedField = (collection, fieldName) => {
if (fieldName === 'title' && collection.get('identifier_field')) {
return selectIdentifier(collection);
}
const inferableField = INFERABLE_FIELDS[fieldName];
const fields = collection.get('fields');
let field;