New View, enable selection of custom container

What can I do to get my container selectable as a Root Container?

I am setting isContainer = true in my JS ComponentMeta, is there another step?

2 Likes

Apparently Kotlin interface delegation and Java default methods don't get along.

https://youtrack.jetbrains.com/issue/KT-18324

So my conclusion:

  1. You must provide a childPositionSchema when building your ComponentDescriptor for it to be listed as a root container.
  2. If you're going to wrap your ComponentDescriptor so that you can use InteractiveSvgIcon in the designer, don't rely on Kotlin delegation for the methods with default implementations (childPositionSchema, events, extensionFunctions, and getInitialProps).

Heh, been bit by this too.

At the top of my OpcUaModuleHook that would otherwise be a nice one-liner :upside_down_face:

class OpcUaModuleHook : GatewayModuleHook by OpcUaModule {

    // Methods with default implementations are not delegated by Kotlin's delegation mechanism, so those are delegated
    // manually.
    // Read the gory details are here: https://youtrack.jetbrains.com/issue/KT-4779#comment=27-2350509

I think this is changing, has changed, something, in Kotlin 2.0. Maybe with the right compiler flags.

2 Likes