Skip to content

Commit

Permalink
fix #1275
Browse files Browse the repository at this point in the history
  • Loading branch information
boikovdv committed Jun 26, 2024
1 parent 316e455 commit dffd83b
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ Changelog
_Note: Gaps between patch versions are faulty, broken or test releases._

## v4.0.0-beta.?? (2024-06-??)

#### :bug: Bug Fix

* Fix hookChange event processing for activate/deactivate component `core/component/init`
* Fix hookChange event should not bubble `bDynamicPage`

## v4.0.0-beta.106 (2024-06-25)

#### :bug: Bug Fix
Expand Down
6 changes: 6 additions & 0 deletions src/components/base/b-dynamic-page/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ Changelog
> - :house: [Internal]
> - :nail_care: [Polish]
## v4.0.0-beta.?? (2024-06-??)

#### :bug: Bug Fix

* Fix hookChange event should not bubble

## v4.0.0-beta.98 (2024-05-21)

#### :bug: Bug Fix
Expand Down
4 changes: 2 additions & 2 deletions src/components/base/b-dynamic-page/b-dynamic-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ export default class bDynamicPage extends iDynamicPage {
return component.reload(params);
}

override canSelfDispatchEvent(_: string): boolean {
return true;
override canSelfDispatchEvent(event: string): boolean {
return !/^(?:hook)(?::\w+(-\w+)*|-change)$/.test(event.dasherize());
}

/**
Expand Down
6 changes: 6 additions & 0 deletions src/core/component/init/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ Changelog
> - :house: [Internal]
> - :nail_care: [Polish]
## v4.0.0-beta.?? (2024-06-??)

#### :bug: Bug Fix

* Fix hookChange event processing for activate/deactivate component

## v4.0.0-beta.91 (2024-04-19)

#### :rocket: New Feature
Expand Down
4 changes: 2 additions & 2 deletions src/core/component/init/states/created.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ export function createdState(component: ComponentInterface): void {
onActivation(normalParent.hook);
}

normalParent.$on('on-hook-change', onActivation);
$a.worker(() => normalParent.$off('on-hook-change', onActivation));
normalParent.$on('onHookChange', onActivation);
$a.worker(() => normalParent.$off('onHookChange', onActivation));
}
}

Expand Down

0 comments on commit dffd83b

Please sign in to comment.