Skip to content

Commit

Permalink
Merge pull request voxel51#2885 from voxel51/mani/embed-document-sidebar
Browse files Browse the repository at this point in the history
Show embedded documents and list of documents in sidebar as filterable fields
  • Loading branch information
manivoxel51 authored Apr 13, 2023
2 parents 3866b6e + 26e9ef5 commit b8adc60
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/packages/state/src/recoil/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,14 @@ export const resolveGroups = (
.reduce(fieldsReducer([EMBEDDED_DOCUMENT_FIELD]), [])
.forEach((name) => {
const fieldPaths = (fields[name].fields || [])
.reduce(fieldsReducer(VALID_PRIMITIVE_TYPES), [])
.reduce(
fieldsReducer([
...VALID_PRIMITIVE_TYPES,
EMBEDDED_DOCUMENT_FIELD,
LIST_FIELD,
]),
[]
)
.map((subfield) => `${name}.${subfield}`)
.filter((path) => !present.has(path));

Expand Down

0 comments on commit b8adc60

Please sign in to comment.