ember-frost-bunsen
Version:
Create UI's from JSON configurations.
38 lines (28 loc) • 850 B
JavaScript
import Ember from 'ember'
const {get} = Ember
import computed, {readOnly} from 'ember-computed-decorators'
import AbstractInput from './abstract-input'
import layout from 'ember-frost-bunsen/templates/components/frost-bunsen-input-textarea'
export default AbstractInput.extend({
// == Component Properties ===================================================
classNames: [
'frost-bunsen-input-textarea',
'frost-field'
],
layout,
// == Computed Properties ====================================================
('cellConfig')
textareaOptions (cellConfig) {
const options = {}
const cols = get(cellConfig, 'renderer.cols')
const rows = get(cellConfig, 'renderer.rows')
if (cols) {
options.cols = cols
}
if (rows) {
options.rows = rows
}
return options
}
})