Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hidden fields with no fieldset create "other" tabs #31

Closed
ccouzens opened this issue Apr 30, 2021 · 0 comments
Closed

hidden fields with no fieldset create "other" tabs #31

ccouzens opened this issue Apr 30, 2021 · 0 comments

Comments

@ccouzens
Copy link
Contributor

If we have hidden fields with no fieldset such-as:

  {
    name: 'publishedAt',
    title: 'Published at',
    type: 'date',
    hidden: true,
    required: true,
  },

then an empty 'Other' tab gets created. Is it possible to have hidden fields ignored when generating the list of tabs?

I'm on version 2.0.1.

Thanks for the plugin :)

ccouzens added a commit to ccouzens/sanity-plugin-tabs that referenced this issue Apr 30, 2021
If all of the fields in a fieldset are hidden, ignore that fieldset.

azzlack#31

---

I removed the check for if the length is greater than 0.

If it's an empty array, then after filtering and sorting it will still
be an empty array. Which is the initial value of `fieldSets`, so no
change.
@azzlack azzlack closed this as completed Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants