File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
lib/internal/Magento/Framework/Data/Form/Element Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 15
15
16
16
class Textarea extends AbstractElement
17
17
{
18
+ /**
19
+ * default number of rows
20
+ *
21
+ * @var int
22
+ */
23
+ const DEFAULT_ROWS = 2 ;
24
+ /**
25
+ * default number of cols
26
+ *
27
+ * @var int
28
+ */
29
+ const DEFAULT_COLS = 15 ;
30
+
18
31
/**
19
32
* @param Factory $factoryElement
20
33
* @param CollectionFactory $factoryCollection
@@ -30,8 +43,12 @@ public function __construct(
30
43
parent ::__construct ($ factoryElement , $ factoryCollection , $ escaper , $ data );
31
44
$ this ->setType ('textarea ' );
32
45
$ this ->setExtType ('textarea ' );
33
- $ this ->setRows (2 );
34
- $ this ->setCols (15 );
46
+ if (!$ this ->getRows ()) {
47
+ $ this ->setRows (self ::DEFAULT_ROWS );
48
+ }
49
+ if (!$ this ->getCols ()) {
50
+ $ this ->setCols (self ::DEFAULT_COLS );
51
+ }
35
52
}
36
53
37
54
/**
You can’t perform that action at this time.
0 commit comments