mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 14:17:18 +00:00
fix(livewire): stop broadcast handlers from wiping in-progress form input
This commit is contained in:
1 parent
65c0c92c02
commit
b9f773c1d9
18 files changed
+470
-247
No files matched your search
@@ -48,13 +48,26 @@ class General extends Component
|
||||
|
||||
public function getListeners()
|
||||
{
|
||||
$userId = Auth::id();
|
||||
$teamId = Auth::user()->currentTeam()->id;
|
||||
|
||||
return [
|
||||
"echo-private:team.{$teamId},DatabaseProxyStopped" => 'databaseProxyStopped',
|
||||
// Broadcasts go to refreshStatus, which only writes display-only properties.
|
||||
// Never wire status broadcasts to a handler that touches text-input properties —
|
||||
// it clobbers in-progress typing every 10s. See coolify#6062 / #6354 / #9695.
|
||||
"echo-private:user.{$userId},DatabaseStatusChanged" => 'refreshStatus',
|
||||
"echo-private:team.{$teamId},ServiceChecked" => 'refreshStatus',
|
||||
];
|
||||
}
|
||||
|
||||
public function refreshStatus(): void
|
||||
{
|
||||
$this->database->refresh();
|
||||
$this->dbUrl = $this->database->internal_db_url;
|
||||
$this->dbUrlPublic = $this->database->external_db_url;
|
||||
}
|
||||
|
||||
public function mount()
|
||||
{
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user