Where can I set panel entry component hidden?

In my project, there is a dropdownlist/select control on property panel, every option choosed to fill a different textfield. At firstly, the select entry component can only be displayed, there other 3 textfield entries can’t be shown. So I need to set them hidden when they has been rendered. But I can’t find where I can set the hidden, I try to do it in shape.created event and element.click event. They don’t work.

function createActionGroup(element, translate) {
    const actionGroup = {
        id: 'action',
        label: translate('action'),
        entries: [dropdownlistProps(element),
            textFieldAProps(element),
            textFieldBProps(element),
            textFieldCProps(element)
        ]
    };
    return actionGroup;
}

In my case, I want to set these three control textFieldA(B,C) hidden when they are rendered firstly. Then I can use select onchange event to control every textfield to show or hide.

function onChange(value) {
    if (value !== "optionA") {
        $("div.bio-properties-panel-entry[data-entry-id='textFieldA']").hide();
    } else {
        $("div.bio-properties-panel-entry[data-entry-id='textFieldA']").show();
    }
}

The select entry onchange event can work fine, but I can’t find where I can set there three textfield entry hidden after they have been rendered. Hope someone can make any suggestions here. Thanks

Can you maybe provide a sketch how your entries should behave in the properties panel and which BPMN properties they represent (if any)?

Am I right that the appearance of the textfields depend on the value of the dropdownlist? The properties panel is usually doing that by adding or not adding the entries depending on the underlying XML property. One example can be found in the ImplementationProps.

Kapture 2022-07-14 at 10.06.20

So instead of hiding/showing the entries after rendering, it simply does not render some on certain conditions. The properties panel is reacting on any change, so it has an own onChange mechanism.

1 Like