mirror of
https://gitlab.com/wirelos/sprocket-ui.git
synced 2025-12-14 14:01:28 +01:00
21 lines
452 B
JavaScript
21 lines
452 B
JavaScript
|
|
import $ from 'jquery';
|
|
import Component from '../../../core/Component';
|
|
import markup from './Select.html';
|
|
|
|
export default class Select extends Component {
|
|
|
|
constructor(ctx, node, template) {
|
|
super(ctx, node, template || markup);
|
|
this.render(this.config);
|
|
}
|
|
|
|
onChange(evt) {
|
|
console.log(evt.target.value);
|
|
}
|
|
|
|
subscribe() {
|
|
this.node.delegate('select', 'change', this.onChange.bind(this));
|
|
}
|
|
|
|
} |