UNPKG

ember-frost-bunsen

Version:
38 lines (28 loc) 850 B
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 ==================================================== @readOnly @computed('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 } })