feat: add filter to collection view (#3741)

This commit is contained in:
Shashank Bairy R
2020-05-24 17:37:08 +00:00
committed by GitHub
parent d3aaf4ddb3
commit c28cc0c9e7
23 changed files with 652 additions and 63 deletions

View File

@ -21,6 +21,28 @@ const fieldsConfig = {
},
};
const viewFilters = {
type: 'array',
minItems: 1,
items: {
type: 'object',
properties: {
label: { type: 'string' },
field: { type: 'string' },
pattern: {
oneOf: [
{ type: 'boolean' },
{
type: 'string',
},
],
},
},
additionalProperties: false,
required: ['label', 'field', 'pattern'],
},
};
/**
* The schema had to be wrapped in a function to
* fix a circular dependency problem for WebPack,
@ -142,6 +164,7 @@ const getConfigSchema = () => ({
type: 'string',
},
},
view_filters: viewFilters,
},
required: ['name', 'label'],
oneOf: [{ required: ['files'] }, { required: ['folder', 'fields'] }],