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.

Why do FilterOptionsProps pass in a Partial user?

default discord avatar
thgh2 years ago
1

Is it because the JWT does not contain all fields?


FilterOptionsProps<T = any> = {
    id: string | number;
    user: Partial<User>;
  • discord user avatar
    jesschow
    2 years ago

    hi @thgh -

    Partial<User>

    is used as there are cases when no user is passed through to

    filterOptions

    . We could also use

    User | null

    which might be clearer.

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.