Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions ampersand-select-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ module.exports = View.extend({

this.eagerValidate = opts.eagerValidate;
this.required = opts.required || false;
this.disabled = (typeof opts.disabled === 'boolean') ? opts.disabled : false;
this.validClass = opts.validClass || 'input-valid';
this.invalidClass = opts.invalidClass || 'input-invalid';
if (opts.requiredMessage === undefined) {
Expand Down Expand Up @@ -120,8 +121,9 @@ module.exports = View.extend({
}
if (!this.select) throw new Error('no select found in template');
if (matches(this.el, 'select')) this.select = this.el;
if (this.select) this.select.setAttribute('name', this.name);
if (this.select) this.select.setAttribute('tabindex', this.tabindex);
this.select.setAttribute('name', this.name);
this.select.setAttribute('tabindex', this.tabindex);
this.select.setAttribute('disabled', this.disabled);

this.bindDOMEvents();
this.renderOptions();
Expand Down