Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty repository in Listener after validation error #2810

Open
darkdarin opened this issue Mar 2, 2024 · 0 comments
Open

Empty repository in Listener after validation error #2810

darkdarin opened this issue Mar 2, 2024 · 0 comments
Assignees
Labels

Comments

@darkdarin
Copy link

darkdarin commented Mar 2, 2024

Describe the bug
Content of repository in Listener ($this->query) is empty after triggered validation error.

To Reproduce
Steps to reproduce the behavior:

  1. Add SubtractListener from Documentation
  2. Add simple Screen with SubtractListener and additional method save
public function save(Request $request): void
{
        $request->validate([
            'anyField' => 'required',
        ]);
}
  1. Add value for minuend and subtrahend fields.
  2. Field result is displayed with value
  3. Save form without anyField value (for trigger error from validation)
  4. See page with validation error, with values in fields minuend and subtrahend, but field result is not displayed. Because this field is displayed when $this->query->has('result'), but no value in repository.

Expected behavior
Repository in Listener ($this-query) contents actual data (then field result is displayed after trigger validation error)

Screenshots
Step 4
image
Step 6
image

Server (please complete the following information):

  • Platfrom Version: 14.19.0
  • Laravel Version: 10.46.0
  • PHP Version: 8.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants