Skip to content

Commit 13bb25a

Browse files
Close dropdown when "Reload"-Entity Action has executed (#19808)
Bind 'action-executed' event handler to class instance Updated the event listener for 'action-executed' to bind the handler to the class instance, ensuring correct 'this' context when the event is triggered.
1 parent 58cc769 commit 13bb25a

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

src/Umbraco.Web.UI.Client/src/packages/core/entity-action/global-components/entity-actions-dropdown/entity-actions-dropdown.element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export class UmbEntityActionsDropdownElement extends UmbLitElement {
5656
// Programmatically create the elements so they are cached if the dropdown is opened again
5757
this.#scrollContainerElement = new UUIScrollContainerElement();
5858
this.#entityActionListElement = new UmbEntityActionListElement();
59-
this.#entityActionListElement.addEventListener('action-executed', this.#onActionExecuted);
59+
this.#entityActionListElement.addEventListener('action-executed', this.#onActionExecuted.bind(this));
6060
this.#entityActionListElement.entityType = this.#entityType;
6161
this.#entityActionListElement.unique = this.#unique;
6262
this.#entityActionListElement.setAttribute('label', this.label ?? '');
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"consoleErrors": []
3+
}

tests/Umbraco.Tests.AcceptanceTest/package-lock.json

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/Umbraco.Tests.AcceptanceTest/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"dependencies": {
2424
"@umbraco/json-models-builders": "^2.0.37",
25-
"@umbraco/playwright-testhelpers": "^16.0.34",
25+
"@umbraco/playwright-testhelpers": "^16.0.36",
2626
"camelize": "^1.0.0",
2727
"dotenv": "^16.3.1",
2828
"node-fetch": "^2.6.7"

0 commit comments

Comments
 (0)