docs: function select_field(options) {
    var self = this;
    var $el = mixin_basic_component(self, "select");
    mixin_emitter(self);
  
    var _sel_idx = -1;
    Object.defineProperty(self, "data", {
      get: function () {
        return _sel_idx;
      },
      set: function (n) {
        if (n == null || n < 0 || n > options.options.length) n = -1;
        _sel_idx = n;
        update_ui();
      }
    });
  
    function update_ui(){
      $el.empty();
      for (var i=0; i<options.options.length; i++){
        (function(o,i){
          var $o = $$('ooption');
          if (_sel_idx == i)
            $o.addClass('selected');
          $o.text(o);
          $o.click(function(){
            self.data = i;
            self.emit('change');
          })
          $el.append($o);
        })(options.options[i], i);
      }
    }
  }