Skip to content

Page reload spinner

The page reload spinner can be used to display a loading spinner if a certain event occurs in a Pusher channel. It reloads the page if loading spinner stops to display the updated data.

Example for show page

For rendering the badge list inside of a show page the x-coreui::out.inline-badge-list View component must be used inside the blade template of the show page:

<v-page-reload-spinner
    :loading="{{ json_encode($license->license_forms_status === \JohnIt\Bc\Licenses\Domain\Enums\LicenseFormsStatus::PROCESSING) }}"
    :loading-updates-channel="{{ json_encode('licenses.'.$license->id) }}"
    :loading-start-event="'.ReGeneratingLicenseForms'"
    :loading-stop-event="'.LicenseFormsGenerated'"
>
    <!-- Put HTML to show if :loading is set to false here -->
</v-page-reload-spinner>

Attributes

loading

Boolean indicating the initial status of the spinner component. Is set to false by default.

loading-updates-channel

Name of the private channel where updates are broadcasted from the backend.

loading-start-event

Name of the event which is broadcased through loading-updates-channel if spinner must indicate a loading status.

loading-stop-event

Name of the event which is broadcased through loading-updates-channel if spinner must reload the page.