Skip to content
Snippets Groups Projects
Commit 3d5766b1 authored by Marius's avatar Marius
Browse files

default cols & rows for textareas

parent 342734c1
No related merge requests found
......@@ -15,6 +15,19 @@ use Magento\Framework\Escaper;
class Textarea extends AbstractElement
{
/**
* default number of rows
*
* @var int
*/
const DEFAULT_ROWS = 2;
/**
* default number of cols
*
* @var int
*/
const DEFAULT_COLS = 15;
/**
* @param Factory $factoryElement
* @param CollectionFactory $factoryCollection
......@@ -30,8 +43,12 @@ class Textarea extends AbstractElement
parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
$this->setType('textarea');
$this->setExtType('textarea');
$this->setRows(2);
$this->setCols(15);
if (!$this->getRows()) {
$this->setRows(self::DEFAULT_ROWS);
}
if (!$this->getCols()) {
$this->setCols(self::DEFAULT_COLS);
}
}
/**
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment