'form-control', 'rows' => 10 ); /** * @param mixed $child */ protected function onAddChild($child) { if(is_string($child) && !$this->props->has('value')) { $this->setProp('value', $child); return false; } return $child; } protected function build() { $autoHeight = $this->prop('autoHeight'); if($autoHeight) $this->setProp('rows', null); return h::textarea ( set($this->props->pick(array('name', 'id', 'class', 'placeholder', 'rows', 'cols', 'disabled', 'readonly'))), $this->prop('required') ? setClass('is-required') : null, $this->prop('value'), $autoHeight ? on::init()->do('$element.autoHeight()') : null, $this->children() ); } }