Compare commits

...

1 Commits

Author SHA1 Message Date
Teffen Ellis
12b795b92a web: Fix issue where refresh events within modals propagate.
- This fixes a situation where a table with a modal... with a table and
  another modal can be closed prematurely.
2025-08-29 20:36:36 +02:00
2 changed files with 15 additions and 2 deletions

View File

@@ -33,6 +33,12 @@ export class RoleAssignedObjectPermissionTable extends Table<RoleAssignedObjectP
checkbox = true;
clearOnRefresh = true;
protected override refreshListener(event: Event) {
event.stopPropagation();
return super.refreshListener(event);
}
async apiEndpoint(): Promise<PaginatedResponse<RoleAssignedObjectPermission>> {
const perms = await new RbacApi(DEFAULT_CONFIG).rbacPermissionsAssignedByRolesList({
...(await this.defaultEndpointConfig()),

View File

@@ -167,9 +167,16 @@ export abstract class Table<T extends object>
@state()
protected error?: APIError;
#refreshListener = () => {
constructor() {
super();
this.#refreshListener = this.refreshListener.bind(this);
}
protected refreshListener(event: Event): void | Promise<void> {
return this.fetch();
};
}
#refreshListener: EventListener;
public override connectedCallback(): void {
super.connectedCallback();