Custom TextInputView fails

We have a custom TextInputView like this:

export class CustomTextInputView extends TextInputView {

    connect_signals() {
        super.connect_signals();       <- Line that fails
        this.connect(this.model.properties.value_enter.change, () => this.input_el.value = this.model.value_enter);
    }

    render() {
        super.render();
        // register event listener to update value_keyup prop
        this.input_el.addEventListener("keyup", (evt) => this.change_input_onkeyup(evt));
    }

    // Update value_keyup prop for Enter keyup in text input element
    change_input_onkeyup(evt) {
        if (evt.key === 'Enter' || evt.keyCode === 13) {
            this.model.value_enter = this.input_el.value;
            super.change_input();
        }
    }
}

This works with Bokeh 2.4.3 but when I use it with Bokeh 3.4.1 I get:

Error rendering Bokeh items: TypeError: property is undefined
    on_change http://127.0.0.1:5000/static/js/bokeh-3.4.1/bokeh.js:9046
    connect_signals http://127.0.0.1:5000/static/js/bokeh-3.4.1/bokeh-widgets.js:534
    connect_signals blob:http://127.0.0.1:5000/11232e1b-8362-47eb-a880-607cec636512:197

Line 197 is line marked as failing above.

on_change bokeh.js:9046 is this:

        on_change(properties, fn) {
            for (const property of (0, types_1.isArray)(properties) ? properties : [properties]) {
                this.connect(property.change, fn);      <--- Line that fails
            }
        }

Any idea what is wrong?

possibly @mateusz can comment about details

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.