@@ -16,6 +16,11 @@ Contents:
16
16
- [ Configuration] ( #configuration )
17
17
- [ Usage] ( #usage )
18
18
- [ Tips and tricks] ( #tips-and-tricks )
19
+ - [ How to customize buttons] ( #how-to-customize-buttons )
20
+ - [ Work with empty list] ( #work-with-empty-list )
21
+ - [ Guess column title] ( #guess-column-title )
22
+ - [ Ajax loading of a widget] ( #ajax-loading )
23
+ - [ Using of a placeholder {multiple_index}] ( #using-placeholder )
19
24
- [ Javascript Events] ( #javascript-events )
20
25
- [ Renderers] ( #renderers )
21
26
@@ -48,9 +53,9 @@ Widget support the following options that are additionally recognized over and a
48
53
49
54
** attributeOptions** * array* : client-side attribute options, e.g. enableAjaxValidation. You may use this property in case when
50
55
you use widget without a model, since in this case widget is not able to detect client-side options automatically
51
-
56
+
52
57
** addButtonPosition** * integer* : the position of ` add ` button. This can be MultipleInput::POS_HEADER or MultipleInput::POS_ROW.
53
-
58
+
54
59
** addButtonOptions** * array* : the HTML options for ` add ` button. Can contains ` class ` and ` label ` keys
55
60
56
61
** removeButtonOptions** * array* : the HTML options for ` add ` button. Can contains ` class ` and ` label ` keys
@@ -61,7 +66,7 @@ Widget support the following options that are additionally recognized over and a
61
66
62
67
** allowEmptyList** * boolean* : whether to allow the empty list
63
68
64
- ** columnClass** * string* : the name of column class. You can specify your own class to extend base functionality.
69
+ ** columnClass** * string* : the name of column class. You can specify your own class to extend base functionality.
65
70
Defaults to ` unclead\widgets\MultipleInputColumn ` for ` MultipleInput ` and ` unclead\widgets\TabularColumn ` for ` TabularInput ` .
66
71
67
72
** columns** * array* : the row columns configuration where you can set the properties which is described below
@@ -86,7 +91,7 @@ function ($model, $index, $context)
86
91
87
92
** title** * string* : the column title
88
93
89
- ** value** * Closure* : you can set it to an anonymous function with the following signature:
94
+ ** value** * Closure* : you can set it to an anonymous function with the following signature:
90
95
91
96
``` php
92
97
function($data) {}
@@ -95,14 +100,14 @@ function($data) {}
95
100
** defaultValue** * string* : default value of input
96
101
97
102
** items** * array* |* Closure* : the items for input with type dropDownList, listBox, checkboxList, radioList
98
- or anonymous function which return array of items and has the following signature:
103
+ or anonymous function which return array of items and has the following signature:
99
104
100
105
``` php
101
106
function($data) {}
102
107
```
103
108
104
109
** options** * array* |* Closure* : the HTML attributes for the input, you can set it as array
105
- or an anonymous function with the following signature:
110
+ or an anonymous function with the following signature:
106
111
107
112
``` php
108
113
function($data) {}
@@ -339,7 +344,7 @@ In some cases you need to have the ability to delete all rows in the list. For t
339
344
340
345
```
341
346
342
- Also you can set ` 0 ` in ` min ` option if you don't need first blank row when data is empty.
347
+ Also you can set ` 0 ` in ` min ` option if you don't need first blank row when data is empty.
343
348
344
349
### Guess column title
345
350
@@ -357,7 +362,7 @@ In this case you can use `enableGuessTitle` option like in the example below:
357
362
358
363
```
359
364
360
- ### Ajax loading of a widget
365
+ ### Ajax loading of a widget < a id = " ajax-loading " ></ a >
361
366
362
367
Assume you want to load a widget via ajax and then show it inside modal window. In this case you MUST:
363
368
@@ -366,7 +371,7 @@ Assume you want to load a widget via ajax and then show it inside modal window.
366
371
367
372
You can fina an example of usage in a discussion of [ issue] ( https://github.com/unclead/yii2-multiple-input/issues/58 )
368
373
369
- ### Using of a placeholder {multiple_index}
374
+ ### Using of a placeholder {multiple_index} < a id = " using-placeholder " ></ a >
370
375
371
376
You can use a placeholder {multiple index} in a widget configuration, e.g. for implementation of dependent drop down lists.
372
377
0 commit comments