-
Notifications
You must be signed in to change notification settings - Fork 13
Added loader for buttons #969
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
Conversation
Why did you go for the loader icon instead of #922? |
|
||
<x-rapidez::tag | ||
is="{{ $tag }}" | ||
:v-bind:class="$loader ? '{ \'button-loading\': $root.loading }' : ''" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked this with @indykoning.
{{ $attributes->merge([
':disabled' => $attributes->has('href') || $attributes->has(':href') || !$disableWhenLoading ? null : '$root.loading',
'v-bind:class' => $loader ? '{ "button-loading": $root.loading }' : null
]) }}
Is not working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In more details the blade compiler seems to fail due to the {
within the {{ ...->merge
creating a corrupted php file akin to
{{ $attributes->merge([
':disabled' => $attributes->has('href') || $attributes->has(':href') || !$disableWhenLoading ? null : '$root.loading',
'v-bind:class' => $loader ? ') 'button-loading' => false
}}
Please sync with master and double check the screenshot changes. |
This will add a loader on a button when we are waiting for request for example inside the checkout. When you add

loader
on a button it will get a loader: