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

Add loading state to buttons #17

Closed
wants to merge 2 commits into from

Conversation

Wulfheart
Copy link
Contributor

@Wulfheart Wulfheart commented May 8, 2020

Closes #16. Adds a loading state to the buttons with no external dependencies.

@ryangjchandler ryangjchandler changed the title Loading Add loading state to buttons May 8, 2020
@ryangjchandler
Copy link
Contributor

Thanks for contributing @Wulfheart! I've modified the description a little so the issue get closed when merged :)

@pktharindu
Copy link
Contributor

Submit buttons are still clickable when loading.
Maybe we could also add disabled attribute on wire:loading to prevent multiple submits?

@danharrin
Copy link
Member

That's a good call, @pktharindu.

@Wulfheart Should be solvable with wire:loading.attr="disabled" on the buttons.

@danharrin danharrin added the enhancement New feature or request label May 9, 2020
@Wulfheart
Copy link
Contributor Author

Thanks for noting it. I will update it.

@nasyrov
Copy link

nasyrov commented May 18, 2020

@Wulfheart perhaps it would be good to add 'disabled' attribute to buttons as well

<button wire:loading.attr="disabled">
    Submit
</button>

@Wulfheart
Copy link
Contributor Author

@nasyrov thanks for your notice. I’m unsure how your proposal is different to the on @danharrin made above.
I’m still on it. Just a little lack of time. 😅

@ryangjchandler
Copy link
Contributor

Hey @Wulfheart, have you had a chance to look at the improvements above?

@Wulfheart
Copy link
Contributor Author

@ryangjchandler To be honest I forgot about it.

By the way: What are the pros of using livewire for user login?

@Wulfheart Wulfheart closed this May 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a spinner while loading
5 participants