Skip to content

Commit

Permalink
Fix: FormComponent updated() lifecycle hook should follow Livewire de…
Browse files Browse the repository at this point in the history
…fault method parameters
  • Loading branch information
tanthammar committed Aug 17, 2020
1 parent 1656b10 commit aabf345
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/FormComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ public function fields()
];
}

public function updated($field)
public function updated($field, $value)
{
$this->fields_updated($field);

$function = $this->parseUpdateFunctionFrom($field);
if (method_exists($this, $function)) $this->$function();
if (method_exists($this, $function)) $this->$function($value);

$this->validateOnly($field, $this->rules(true));
}
Expand Down

0 comments on commit aabf345

Please sign in to comment.