Skip to content

Commit

Permalink
fix: the block mode callback handler
Browse files Browse the repository at this point in the history
  • Loading branch information
rezaelahidev committed Jan 4, 2025
1 parent e99917d commit 3220e0a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/editor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## Unreleased

## Bug Fixes
- Ensured compatibility with the React.js rendering pipeline.[[🔗 Bug](https://community.blockera.ai/bugs-mdhyb8nc/post/single-product-block-error-bXDiO88g7LsP0hV)]
- Ensured compatibility with the React.js rendering pipeline [[🔗 Bug](https://community.blockera.ai/bugs-mdhyb8nc/post/single-product-block-error-bXDiO88g7LsP0hV)].
- Fixed the block mode callback handler to improve functionality and reliability [[🔗 Bug](https://community.blockera.ai/bugs-mdhyb8nc/post/block-mode-switch-not-works-FsR1uwRuIcCakWp)].

## 1.0.0 (2024-12-08)

Expand Down
4 changes: 2 additions & 2 deletions packages/editor/js/extensions/components/block-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ export const BlockBase: ComponentType<any> = memo((): Element<any> | null => {
);
const setActive = useCallback(
(blockeraMode: 'advanced' | 'basic'): void => {
_setActive('advanced' === blockeraMode);
_setActive(blockeraMode);
setAttributes({
...attributes,
blockeraMode,
blockeraMode: blockeraMode ? 'advanced' : 'basic',
});
},
// eslint-disable-next-line
Expand Down

0 comments on commit 3220e0a

Please sign in to comment.