How to use the @hpcc-js/form.OnOff function in @hpcc-js/form

To help you get started, we’ve selected a few @hpcc-js/form examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hpcc-systems / Visualization / packages / composite / src / Dermatology.ts View on Github external
enter(domNode, element) {
        super.enter(domNode, element);

        this
            .topPercentage(0)
            .topSize(0)
            .setContent("top", this._toolbar)
            ;
        this.getCell("top").surfaceShadow(true);

        const context = this;
        this._propsButton = new OnOff()
            .id(this.id() + "_props")
            .value("Properties")
            .on("click", function () {
                context
                    .toggleProperties()
                    .render()
                    ;
            })
            ;
        this._toolbar.widgets([this._propsButton]);
    }