Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Parent field twice in UI with nested docs field override

default discord avatar
mvdve2 years ago
2

Hi All, I am using the nested docs plugin to create a nested category collection. I would like to override the filterOptions value to prevent the selection of a parent who also has a parent (to limit the depth to two deep), but the parent select list component is not merged but rendered twice within the UI. Once the original and also the new one. Same happens for the breadcrumbs. Is this a bug or am i doing something wrong? Thanks.



fields: [
    name(true),
    slug,
    createParentField(
        "locationCategories",
        {
            filterOptions: ({id}) => {
                return {
                    and: [
                        {
                            id: {
                                not_equals: id
                            }
                        },
                        {
                            parent: {
                                exists: false,
                            }
                        },
                    ]
                }
            }
        }
    ),
]
  • default discord avatar
    jessrynkarlast year

    Hi

    @557183523879124992

    are you still experiencing this problem? Quite a few issues were closed out on the nested docs plugin recently.

  • default discord avatar
    mvdvelast year
    @854377910689202256

    Sorry for te late reply, i will test this this week. Thanks for the heads up!



    This has been resolved in 1.0.6. Thanks!

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.