Skip to content

Commit

Permalink
Don't reload field layout designer for cloned new block type
Browse files Browse the repository at this point in the history
Might be relevant to #862
  • Loading branch information
ttempleton committed Mar 8, 2024
1 parent 4e2b93e commit f836ab9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Fixed missing `getField()` method on blocks
- Fixed an error that occurred when changing the propagation method for a Neo field with no blocks
- Fixed an error that could occur when cloning block types, if Neo's `blockTypeIconSelectMode` plugin setting is set to `'path'`
- Fixed a bug where field layout designers for new block types could be reloaded when cloning those block types

## 4.0.6 - 2024-02-23

Expand Down
2 changes: 1 addition & 1 deletion src/assets/dist/neo-configurator.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/assets/dist/neo-configurator.js.map

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/assets/src/configurator/BlockType.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ export default Item.extend({
this.$moveButton = $neo.filter('[data-neo-bt="button.move"]')
this.$actionsButton = $neo.filter('[data-neo-bt="button.actions"]')

// If new block type, set settings / field layout designer as already loaded
if (/^new([0-9]+)$/.test(String(this.getId()))) {
this._loaded = true
}

// Set up the actions menu
this.$actionsButton.menubtn()
this._actionsMenu = this.$actionsButton.data('menubtn')
Expand Down

0 comments on commit f836ab9

Please sign in to comment.