Removing a property panels tab

How do you remove a tab from the properties panel? The one forum entry on the topic points to a broken link.

Hello @dquinn,

The link pointed to an older version of the properties panel. Like mentioned in the other forum reply, you can exclude specific tabs by modifying the provider.

Thanks for the response @beatriz.mendes. Could you explain or show an example for how to correctly modify a properties panel provider(to remove tabs)? Also, I should mention we’re using version 0.46.0, so you could target that version for examples/documentation I would appreciate it.

You can extend the properties panel with a custom properties provider (see example), and (with v0.46.0) you can remove the wanted groups in getTabs, like so:

this.getTabs = function (element) {
  return function (entries) {

    // Remove a tab
    const idx = findEntry(entries, "general")

    entries.splice(idx, 1);

    return entries;
  };
};

/// helper
function findEntry(entries, entryId) {
  return findIndex(entries, (e) => e.id === entryId);
}

OK, thanks. Thats similar to what we’re already going.

I thought there was another way, some sort of flag to set, because there are always ten entries but less than half of them show on the properties panel for each element.

Thanks for your help!