I am trying to create a Palette with headlines for the groups in addition to separators. I found the update function that creates the separators and that I would need to edit. I also found this example about creating a custom Palette.
What I’m struggling with is to put those two together. My initial thought was to take the custom palette from the example project and instead of having a custom getPaletteEntries-Function use a custom update-Function. But taking the getPaletteEntries-Function out results in an error that it is missing (I would expect it to use the default function). Moreover, the update function is never called.
How would I go about overriding the update function for the Palette?
Be aware that dealing with any _ prefixed methods is dangerous business. These are not part of the public API and may change without notice.
As an alternative, you could simply replace the palette all together. As long as you stay API-compatible to the existing palette, it does not matter if you provide the palette or of the stock palette is used: