Skip to content

Commit

Permalink
Flash of content fix
Browse files Browse the repository at this point in the history
Feels a bit hacky, but seems to work ok, will need to test with ng1.5
before release.
  • Loading branch information
Anthropic committed Mar 30, 2017
1 parent 016693a commit ea1e63e
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 10 deletions.
21 changes: 19 additions & 2 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
v1.0.0-alpha.2
v1.0.0-alpha.3
--------------
This is the second (of many) alpha and is **NOT ready for production** yet.
This is the third (of many) alpha and is **NOT ready for production** yet.

This alpha fixes a few bugs like the annoying "Invalid type, expected array" error when an array content is invalid.

## Known issues
- In Angular 1.5+ some odd behaviours can occur if refreshing a form with a flash of content experienced
The digest cycle is getting stuck under some unknown conditions which is most likely related

## Changes

### Fixed
- Arrays update validity more consistently, removed Angular version specific code
- Add-ons will now correctly display by the added type being passed to the core correctly
- #750 Unstoppable "Invalid type, expected array" when form initialised with incorrect array content.
- #633 #602 custom validator errors.
- #558 Add check for schema property to prevent form generation failures when a checkbox is explicitly defined by a developer (and therefore does not have a schema property) by @vinceis1337 in #663

v1.0.0-alpha.2
--------------
There is only one change in this alpha that needs user testing and feedback, the long awaited and much desired support for $ref.

## Changes
Expand Down
3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"angular-schema-form-tinymce": "^0.1.0"
},
"resolutions": {
"jquery": "~2.1.1"
"jquery": "~2.1.1",
"angular": "1.3"
}
}
2 changes: 1 addition & 1 deletion dist/angular-schema-form-bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* angular-schema-form
* @version 1.0.0-alpha.3
* @date Mon, 27 Mar 2017 13:17:01 GMT
* @date Thu, 30 Mar 2017 07:57:38 GMT
* @link https://github.com/json-schema-form/angular-schema-form
* @license MIT
* Copyright (c) 2014-2017 JSON Schema Form
Expand Down
2 changes: 1 addition & 1 deletion dist/angular-schema-form-bootstrap.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions dist/angular-schema-form.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* angular-schema-form
* @version 1.0.0-alpha.3
* @date Mon, 27 Mar 2017 13:17:01 GMT
* @date Thu, 30 Mar 2017 07:57:38 GMT
* @link https://github.com/json-schema-form/angular-schema-form
* @license MIT
* Copyright (c) 2014-2017 JSON Schema Form
Expand Down Expand Up @@ -3861,8 +3861,6 @@ FIXME: real documentation
};

scope.render = function (schema, form) {
//console.log("schema:", JSON.stringify(schema));
//console.log("resolv:", JSON.stringify(resolved));
var asyncTemplates = [];
var merged = schemaForm.merge(schema, form, undefined, ignore, scope.options, undefined, asyncTemplates);

Expand Down Expand Up @@ -3926,6 +3924,7 @@ FIXME: real documentation
// We use a ordinary timeout since we don't need a digest after this.
setTimeout(function () {
childScope.firstDigest = false;
scope.$apply();
}, 0);

//compile only children
Expand Down
4 changes: 2 additions & 2 deletions dist/angular-schema-form.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/directives/sf-schema.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ sfSelect, sfPath, sfBuilder) {
// We use a ordinary timeout since we don't need a digest after this.
setTimeout(function() {
childScope.firstDigest = false;
scope.$apply();
}, 0);

//compile only children
Expand Down

0 comments on commit ea1e63e

Please sign in to comment.