@@ -12,6 +12,12 @@ Features:
1212* Sync and Async callbacks
1313* HTTP GET/POST convenience functions
1414
15+ <b >Note:<br />
16+ Since 0.3.3 value/name-pairs for drop down data is deprecated.<br />
17+ The correct way, and how the HTML select element actually works, is value/text.<br />
18+ The the add-on still supports both variants, but value/name will either be removed or<br />
19+ replaced by a mapping in a later major version.
20+ <b />
1521
1622#Installation
1723
@@ -73,33 +79,33 @@ All settings are made in the form definition. Sehttp://gulpjs.com/e the app.js f
7379
7480
7581### Single select from static list
76- The selection is an array of value/name objects
82+ The selection is an array of value/text objects
7783
7884 {
7985 "key": 'select',
8086 "type": 'strapselect',
8187 "items": [
82- {"value": 'value1', "name ": 'label1'},
83- {"value": 'value2', "name ": 'label2'},
84- {"value": 'value3', "name ": 'label3'}
88+ {"value": 'value1', "text ": 'label1'},
89+ {"value": 'value2', "text ": 'label2'},
90+ {"value": 'value3', "text ": 'label3'}
8591 ]
8692 },
8793
8894### Single select from static list
89- The selection is an array of value/name objects
95+ The selection is an array of value/text objects
9096
9197 {
9298 "key": 'multiselect',
9399 "type": 'strapmultiselect',
94100 "items": [
95- {"value": 'value1', "name ": 'label1'},
96- {"value": 'value2', "name ": 'label2'},
97- {"value": 'value3', "name ": 'long very very long label3'}
101+ {"value": 'value1', "text ": 'label1'},
102+ {"value": 'value2', "text ": 'label2'},
103+ {"value": 'value3', "text ": 'long very very long label3'}
98104 ]
99105 },
100106
101107### Single select from dynamically loaded list via synchronous callback function
102- Callback must return an array of value/name objects (see static list above)
108+ Callback must return an array of value/text objects (see static list above)
103109
104110 {
105111 "key": "selectdynamic",
@@ -110,7 +116,7 @@ Callback must return an array of value/name objects (see static list above)
110116 },
111117
112118### Multiple select from dynamically loaded list via synchronous callback function
113- Callback must return an array of value/name objects.
119+ Callback must return an array of value/text objects.
114120
115121 {
116122 "key": "multiselectdynamic",
@@ -122,7 +128,7 @@ Callback must return an array of value/name objects.
122128
123129### Multiple select from dynamically loaded list via http post
124130Convenience function, makes a JSON post request passing the "parameter" as is, no need for callback.
125- Expects the server to return a JSON array of value/name objects.
131+ Expects the server to return a JSON array of value/text objects.
126132
127133 {
128134 "key": "multiselectdynamic_http_post",
@@ -137,7 +143,7 @@ Expects the server to return a JSON array of value/name objects.
137143
138144### Multiple select from dynamically loaded list via http get
139145Convenience function, makes a get request, no need for callback.
140- Expects the server to return a JSON array of value/name objects.
146+ Expects the server to return a JSON array of value/text objects.
141147
142148 {
143149 "key": "multiselectdynamic_http_get",
@@ -153,7 +159,7 @@ Expects the server to return a JSON array of value/name objects.
153159Note that the "call" parameter is the only mandatory parameter, the "url" is for convenience.
154160The point is that the "options" structure is passed to all callbacks, making it possible to use fever callback function,
155161allowing for cleaner(or not) code.
156- The callback shall return a http-style promise and the data must be a JSON array of value/name objects.
162+ The callback shall return a http-style promise and the data must be a JSON array of value/text objects.
157163
158164 {
159165 "key": "multiselectdynamic_async",
0 commit comments