Skip to content

Commit dbe6670

Browse files
author
Eugene Tupikov
committed
Added columnClass option and prepare to release 1.2.10
1 parent 120a2ca commit dbe6670

File tree

5 files changed

+27
-6
lines changed

5 files changed

+27
-6
lines changed

CHANGELOG.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
Yii2 multiple input change log
22
==============================
33

4-
1.2.10 in development
5-
--------------------
4+
1.2.11 in development
5+
---------------------
6+
7+
1.2.10
8+
------
9+
10+
- En #59 Added columnClass property (unclead)
611

712
1.2.9
813
-----

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Yii2 widget for handle multiple inputs for an attribute of model
88
[![License](https://poser.pugx.org/unclead/yii2-multiple-input/license)](https://packagist.org/packages/unclead/yii2-multiple-input)
99

1010
##Latest release
11-
The latest version of the extension is v1.2.9. Follow the [instruction](./UPGRADE.md) for upgrading from previous versions
11+
The latest version of the extension is v1.2.10. Follow the [instruction](./UPGRADE.md) for upgrading from previous versions
1212

1313
Contents:
1414

@@ -61,6 +61,9 @@ Widget support the following options that are additionally recognized over and a
6161

6262
**allowEmptyList** *boolean*: whether to allow the empty list
6363

64+
**columnClass** *string*: the name of column class. You can specify your own class to extend base functionality.
65+
Defaults to `unclead\widgets\MultipleInputColumn` for `MultipleInput` and `unclead\widgets\TabularColumn` for `TabularInput`.
66+
6467
**columns** *array*: the row columns configuration where you can set the properties which is described below
6568

6669
**rowOptions** *array|\Closure*: the HTML attributes for the table body rows. This can be either an array

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"yii2 tabular input"
1010
],
1111
"type": "yii2-extension",
12-
"version": "1.2.9",
12+
"version": "1.2.10",
1313
"license": "BSD-3-Clause",
1414
"support": {
1515
"issues": "https://github.com/unclead/yii2-multiple-input/issues?state=open",

src/MultipleInput.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ class MultipleInput extends InputWidget
9393
*/
9494
public $rowOptions = [];
9595

96+
/**
97+
* @var string the name of column class. You can specify your own class to extend base functionality.
98+
* Defaults to `unclead\widgets\MultipleInputColumn`
99+
*/
100+
public $columnClass;
101+
96102
/**
97103
* Initialization.
98104
*
@@ -155,7 +161,7 @@ private function createRenderer()
155161
'limit' => $this->limit,
156162
'attributeOptions' => $this->attributeOptions,
157163
'data' => $this->data,
158-
'columnClass' => MultipleInputColumn::className(),
164+
'columnClass' => $this->columnClass !== null ? $this->columnClass : MultipleInputColumn::className(),
159165
'allowEmptyList' => $this->allowEmptyList,
160166
'min' => $this->min,
161167
'addButtonPosition' => $this->addButtonPosition,

src/TabularInput.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ class TabularInput extends Widget
8787
*/
8888
public $rowOptions = [];
8989

90+
91+
/**
92+
* @var string the name of column class. You can specify your own class to extend base functionality.
93+
* Defaults to `unclead\widgets\TabularColumn`
94+
*/
95+
public $columnClass;
96+
9097
/**
9198
* Initialization.
9299
*
@@ -126,7 +133,7 @@ private function createRenderer()
126133
'limit' => $this->limit,
127134
'attributeOptions' => $this->attributeOptions,
128135
'data' => $this->models,
129-
'columnClass' => TabularColumn::className(),
136+
'columnClass' => $this->columnClass !== null ? $this->columnClass : TabularColumn::className(),
130137
'allowEmptyList' => $this->allowEmptyList,
131138
'min' => $this->min,
132139
'rowOptions' => $this->rowOptions,

0 commit comments

Comments
 (0)