Panel options subcategories

Hi all! Is it possible in setPanelOptions to put inputs in subcategories?

Here’s an example. I am referring to “Panel Links” and “Repeat Options” as subcategories within “Panel Options”.

I’ve already tried to add multiple entries into the category array, but it just puts everything under the first entry, or “Data options” in my example.

      .addFieldNamePicker({
        path: 'relHum',
        name: 'Relative Humidity Series',
        description: 'Select a series that measures the relative humidity.',
        category: ['Data options', 'Series A'],
        settings: {
          filter: (f: Field) => f.type === 'number',
          noFieldsMessage: 'No valid fields found',
        },
        showIf: (x) => x.measurements === 'dbrh',
      })

This is what happens:

I would expect it to be in a collapsible “Series A” category within “Data options”. Any ideas on how to achieve this? Any help is appreciated! Thanks.

I think I figured it out. You need to use addNestedOptions like so:

.addNestedOptions({
  path: 'demo1',
  category: ['Main category'],
  build(subbuilder) {
    subbuilder.addBooleanSwitch({
      name: 'Test',
      path: 'demo2',
      category: ['Subcategory'],
    })
  },
})

Screenshot 2023-11-14 at 2.55.35 PM