Skip to content

Commit 356677f

Browse files
committed
Merge branch 'release/0.8.4'
2 parents e6c4fb6 + 3b35f51 commit 356677f

File tree

12 files changed

+18
-103
lines changed

12 files changed

+18
-103
lines changed

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
v0.8.4
2+
------
3+
* Reverted `trackBy`. Fixes #458, #462, #471
4+
5+
16
v0.8.3
27
------
38
* "destroyStrategy" support, thanks @jbsaff! This means that `condition` can now remove values

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"dist/schema-form.js",
55
"dist/bootstrap-decorator.js"
66
],
7-
"version": "0.8.3",
7+
"version": "0.8.4",
88
"authors": [
99
"Textalk",
1010
"David Jensen <david.lgj@gmail.com>",

dist/bootstrap-decorator.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/bootstrap-decorator.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/schema-form.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ var schemaForm = angular.module('schemaForm', deps);
3434
angular.module('schemaForm').provider('sfPath',
3535
[function() {
3636

37-
// When building with browserify it's objectpath,
38-
// otherwise it's just objectpath.
37+
// When building with browserify ObjectPath is available as `objectpath` but othwerwise
38+
// it's called `ObjectPath`.
3939
var ObjectPath = window.ObjectPath || objectpath;
4040

4141
var sfPath = {parse: ObjectPath.parse};
@@ -968,7 +968,7 @@ angular.module('schemaForm').provider('schemaForm',
968968
return type[0];
969969
}
970970
return type;
971-
};
971+
}
972972

973973
//Creates an default titleMap list from an enum, i.e. a list of strings.
974974
var enumToTitleMap = function(enm) {
@@ -1101,7 +1101,6 @@ angular.module('schemaForm').provider('schemaForm',
11011101
if (!f.titleMap) {
11021102
f.titleMap = enumToTitleMap(schema['enum']);
11031103
}
1104-
f.trackBy = 'value';
11051104
options.lookup[sfPathProvider.stringify(options.path)] = f;
11061105
return f;
11071106
}
@@ -1295,10 +1294,6 @@ angular.module('schemaForm').provider('schemaForm',
12951294
obj.titleMap = canonicalTitleMap(obj.titleMap);
12961295
}
12971296

1298-
if(obj.type === 'select') {
1299-
obj.trackBy = obj.trackBy || 'value';
1300-
}
1301-
13021297
//
13031298
if (obj.itemForm) {
13041299
obj.items = [];

dist/schema-form.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-schema-form",
3-
"version": "0.8.3",
3+
"version": "0.8.4",
44
"description": "Create complex forms from a JSON schema with angular.",
55
"repository": "Textalk/angular-schema-form",
66
"main": "dist/schema-form.min.js",

src/directives/decorators/bootstrap/select.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
sf-changed="form"
1010
class="form-control {{form.fieldHtmlClass}}"
1111
schema-validate="form"
12-
ng-options="item.value as item.name group by item.group for item in form.titleMap track by item[form.trackBy]"
12+
ng-options="item.value as item.name group by item.group for item in form.titleMap"
1313
name="{{form.key.slice(-1)[0]}}">
1414
</select>
1515
<div class="help-block" sf-message="form.description"></div>

src/services/schema-form.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ angular.module('schemaForm').provider('schemaForm',
1313
return type[0];
1414
}
1515
return type;
16-
};
16+
}
1717

1818
//Creates an default titleMap list from an enum, i.e. a list of strings.
1919
var enumToTitleMap = function(enm) {
@@ -146,7 +146,6 @@ angular.module('schemaForm').provider('schemaForm',
146146
if (!f.titleMap) {
147147
f.titleMap = enumToTitleMap(schema['enum']);
148148
}
149-
f.trackBy = 'value';
150149
options.lookup[sfPathProvider.stringify(options.path)] = f;
151150
return f;
152151
}
@@ -340,10 +339,6 @@ angular.module('schemaForm').provider('schemaForm',
340339
obj.titleMap = canonicalTitleMap(obj.titleMap);
341340
}
342341

343-
if(obj.type === 'select') {
344-
obj.trackBy = obj.trackBy || 'value';
345-
}
346-
347342
//
348343
if (obj.itemForm) {
349344
obj.items = [];

src/sfPath.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
angular.module('schemaForm').provider('sfPath',
22
[function() {
33

4-
// When building with browserify it's objectpath,
5-
// otherwise it's just objectpath.
4+
// When building with browserify ObjectPath is available as `objectpath` but othwerwise
5+
// it's called `ObjectPath`.
66
var ObjectPath = window.ObjectPath || objectpath;
77

88
var sfPath = {parse: ObjectPath.parse};

0 commit comments

Comments
 (0)