Skip to content

Commit

Permalink
list the fieldsets to include from the old schema
Browse files Browse the repository at this point in the history
  • Loading branch information
ionlizarazu committed Oct 13, 2022
1 parent 691554e commit 20ac5ca
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/advancedSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ export const advancedSchema = (props) => {
},
]
: [];
const include_fieldsets = ['default', 'searchquery', 'facets', 'controls'];

return {
...schema,
fieldsets: [
...(schema.fieldsets &&
schema.fieldsets.length > 0 &&
schema.fieldsets.filter((fieldset) => fieldset.id === 'default')),
...(schema.fieldsets &&
schema.fieldsets.length > 0 &&
schema.fieldsets.filter((fieldset) => fieldset.id === 'searchquery')),
schema.fieldsets.filter((fieldset) =>
include_fieldsets.includes(fieldset.id),
)),
...heading,
{
id: 'columns',
Expand Down

0 comments on commit 20ac5ca

Please sign in to comment.