Skip to content

A free open source IT asset/license management system

Migrate away from dispatchBrowserEvent()

Marcus Moore8ff639913dcb
diff --git a/app/Livewire/OauthClients.php b/app/Livewire/OauthClients.php
index 78f4aab9d6..d3803a7b28 100644
--- a/app/Livewire/OauthClients.php
+++ b/app/Livewire/OauthClients.php
@@ -50,7 +50,7 @@ class OauthClients extends Component
$this->redirect,
);
- $this->dispatchBrowserEvent('clientCreated');
+ $this->dispatch('clientCreated');
}
public function deleteClient(Client $clientId): void
@@ -83,7 +83,7 @@ class OauthClients extends Component
$this->editClientId = $editClientId->id;
- $this->dispatchBrowserEvent('editClient');
+ $this->dispatch('editClient');
}
public function updateClient(Client $editClientId): void
@@ -103,7 +103,7 @@ class OauthClients extends Component
$this->authorizationError = 'You are not authorized to edit this client.';
}
- $this->dispatchBrowserEvent('clientUpdated');
+ $this->dispatch('clientUpdated');
}
}
diff --git a/app/Livewire/PersonalAccessTokens.php b/app/Livewire/PersonalAccessTokens.php
index ca96f030f4..2d2f56662a 100644
--- a/app/Livewire/PersonalAccessTokens.php
+++ b/app/Livewire/PersonalAccessTokens.php
@@ -17,7 +17,7 @@ class PersonalAccessTokens extends Component
//this is just an annoying thing to make the modal input autofocus
public function autoFocusModalEvent(): void
{
- $this->dispatchBrowserEvent('autoFocusModal');
+ $this->dispatch('autoFocusModal');
}
public function render()
@@ -42,7 +42,7 @@ class PersonalAccessTokens extends Component
$this->newTokenString = $newToken->accessToken;
- $this->dispatchBrowserEvent('tokenCreated', $newToken->accessToken);
+ $this->dispatch('tokenCreated', token: $newToken->accessToken);
}
public function deleteToken($tokenId): void