Skip to content

Commit

Permalink
Merge pull request #1362 from forest-lynx/updateInPopover_cannot_when…
Browse files Browse the repository at this point in the history
…_readonly

fix: Prohibiting updates in the pop-up form when the field is read-only.
  • Loading branch information
lee-to authored Dec 10, 2024
2 parents fb99197 + 29cb57a commit cc525f2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/UI/src/Traits/Fields/UpdateOnPreview.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@ trait UpdateOnPreview
public function readonly(Closure|bool|null $condition = null): static
{
$this->updateOnPreview(condition: false);
$this->updateOnPreviewPopover = false;

return parent::readonly($condition);
}

public function withUpdateRow(
string $component,
): static {
public function withUpdateRow(string $component): static
{

if ($this->isRawMode()) {
return $this;
}
Expand All @@ -57,9 +58,8 @@ public function withUpdateRow(
);
}

public function updateInPopover(
string $component
): static {
public function updateInPopover(string $component): static
{
$this->updateOnPreviewPopover = true;

return $this->withUpdateRow($component);
Expand Down

0 comments on commit cc525f2

Please sign in to comment.