How to use the @jupyter-widgets/controls.TextView function in @jupyter-widgets/controls

To help you get started, we’ve selected a few @jupyter-widgets/controls 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 ideonate / jupyter-innotater / jupyter-innotater / js / lib / customwidgets.js View on Github external
var widgets = require('@jupyter-widgets/base');
var controls = require('@jupyter-widgets/controls');

require("./style.css");

var _ = require('lodash');

var $ = require('jquery');


var FocusTextView = controls.TextView.extend({

    events: function () {
        var d = FocusTextView.__super__.events(this, arguments);
        d['click input'] = 'handleFocus';
        return d;
    }

});

FocusTextView.prototype.handleFocus = function(e) {
    this.send({ event: 'click' });
};

module.exports = {
    FocusTextView: FocusTextView
};