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

$submitting isn't reset when there is an error. #485

Open
1 task done
niemyjski opened this issue Sep 21, 2024 · 3 comments
Open
1 task done

$submitting isn't reset when there is an error. #485

niemyjski opened this issue Sep 21, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@niemyjski
Copy link
Contributor

  • Before posting an issue, read the FAQ and search the previous issues.

Description
I made a request which threw an exception during onUpdate. submitting was not reset and so I always have a loading spinner.

image

On side note, I tried to look where submitting was set (didn't see any references)

@niemyjski niemyjski added the bug Something isn't working label Sep 21, 2024
@ciscoheat
Copy link
Owner

I can't reproduce this, using this test:

import SuperDebug from '$lib/index.js';

When I do the test, submitting is reset to false for all events.

@niemyjski
Copy link
Contributor Author

I'll try to create a sample. Also while looking at this, noticed you cannot use onError to update the message as form is missing.

 onError({ form }) {
          setMessage(form, 'An error occurred while logging in, please try again.');
      },
        ```

@ciscoheat
Copy link
Owner

ciscoheat commented Sep 23, 2024

Yes, there is no data for the form to update as an exception was thrown, you have to set $message or other stores directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants