Skip to content

Commit

Permalink
Update the block preview on load so it correctly shows the preview #331
Browse files Browse the repository at this point in the history
  • Loading branch information
pvldigital committed Apr 15, 2020
1 parent 4db3205 commit 72fc893
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,7 @@
## Fixed
- Fixed an issue when publishing a multisite draft #330, [comment of issue](https://github.com/spicywebau/craft-neo/issues/330#issuecomment-613833346)
- Added a fix for the neo structure job. Thanks @engram-design.
- Update the block preview on load so it correctly shows the preview. #331

## 2.7.6 - 2020-04-11

Expand Down
6 changes: 6 additions & 0 deletions client/src/input/Input.js
Expand Up @@ -171,6 +171,12 @@ export default Garnish.Base.extend({
// add error highlight for matrix fields within neo
this._setMatrixClassErrors();
this._setBlockTypeClassErrors();

this._blocks.forEach(function(block){
if (!block.isExpanded()) {
block.updatePreview()
}
});
},

updateResponsiveness()
Expand Down

0 comments on commit 72fc893

Please sign in to comment.