Bug: "admin" is allowed on NamedTab type, but its value is ignored & NamedTab always included

default discord avatar
andwrobs
last year
1 1

Hi Team Payload,

It appears that while "admin" is allowed on a NamedTab type, that its value gets ignored.

If this is better meant as an issue, happy to delete and repost.


For reference:

  • NamedTab type below shows that "admin" property is included from union w/ FieldBase

    • export declare type NamedTab = TabBase & FieldBase;
  • Here's a snapshot of what I'm trying to do — dynamically include the relevant tabs based on a enumerated layout property

    • Screen Shot 2022-10-20 at 1 28 06 PM
  • Results = still present even with always false value

    • Screen Shot 2022-10-20 at 1 28 24 PM
  • discord user avatar
    PatrikKozak
    Payload Team
    10 months ago

    Hey @andwrobs — currently conditions are not meant to work on tabs. So we will need to omit that property from FieldBase. However, enabling it would be a good feature request and we will keep it on the radar!

Open the post
Continue the discussion in GitHub
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.