Skip to content

LoadingModal Component

The LoadingModal component is a reusable modal for displaying a loading spinner with an optional message.

Purpose and Utility

The LoadingModal component is used to indicate that a process is ongoing. It prevents user interaction with the UI until the process is complete.

Example Usage

The LoadingModal component is used in pages like UserManagement to show a loading spinner during API calls:

<template>
  <LoadingModal :loading="loading" />
</template>

Props

  • size (Number): The size of the spinner. Default is 21.
  • loading (Boolean): Whether the modal is visible. Default is false.
  • enableHide (Boolean): Whether to show a button to hide the modal. Default is false.

Watchers

  • loading: Shows or hides the modal based on the loading prop.

Notes

  • The LoadingModal component uses BootstrapVue's modal for styling and functionality.
  • The spinner is styled using Font Awesome icons.