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

Is there a way to add a loading-spinner during the chart loading? #110

Open
morganealemany opened this issue Nov 16, 2023 · 1 comment
Open

Comments

@morganealemany
Copy link

Summary

I have a chart that takes time to appear due to lots of datas. I want to add a loading-spinner during this time of loading.

I try to use the wire:loading directive of livewire but it seems that it doesn't work on an entire component.

I try some things like :
<div style="height:32rem" wire:loading> <div class="loader">Loading...</div> </div> <div style="height:32rem" wire:loading.remove> <livewire:livewire-column-chart key="{{ $columnChartModel->reactiveKey() }}" :column-chart-model="$columnChartModel" /> </div>

or

<div style="height:32rem"> <livewire:livewire-column-chart key="{{ $columnChartModel->reactiveKey() }}" :column-chart-model="$columnChartModel" /> <p wire:loading wire:model="column-chart-model">Loading...</p> </div>

with no success.

Is there a way to use this wire:loading or another way specific to livewire-charts maybe?

Despite my searches I couldn't find any answers.

@lrljoe
Copy link

lrljoe commented Nov 24, 2023

Are you using livewire 3?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants