26 lines
647 B
JavaScript
26 lines
647 B
JavaScript
import BaseFormInput from './form-field';
|
|
import { computed } from '@ember/object';
|
|
|
|
export default BaseFormInput.extend({
|
|
options: [],
|
|
'value-field': 'value',
|
|
'text-field': 'text',
|
|
'enabled-field': null,
|
|
'hidden-input': true,
|
|
loose: true,
|
|
'fire-init-change': true,
|
|
'values-as-string': true,
|
|
'values-splitter': ',',
|
|
'col-width': computed('multiple', {
|
|
get() {
|
|
if (this._col_width) {
|
|
return this._col_width;
|
|
}
|
|
return this.get('multiple') ? 12 : 7;
|
|
},
|
|
set(key, value) {
|
|
return this._col_width = value;
|
|
}
|
|
})
|
|
});
|