Add spinner and disabled backgound

Hello, 
I would like to add a spinner in my application. 

It works if I add createSpinner and showSpinner.

But I would like to prevent user to click outside the spinner like an overlay backgound. 

How can I do it ? 

thx

3 Replies 1 reply marked as answer

SD Suwathi Dhakshanamoorthy Syncfusion Team August 27, 2020 01:38 PM UTC

Hi Foulont, 
 
 
Greetings from Syncfusion support. 
 
 
We can achieve your requirement “prevent outside access while the spinner is displaying with overlay background” using cssClass 'e-spin-overlay' in `createSpinner` method.  
We prepared the sample based on your requirements and updated below. 
Please refer to the above sample and confirm whether it meets your requirements. 
 
Regards, 
Suwathi 


Marked as answer

PM PRIYA MODAK July 3, 2023 10:21 AM UTC

Hi Syncfusion Team,

I would like you to ask that if I want to set the spinner at the center of the screen and while spinning the fullscreen mode should not be enabled. I mean, while spinner is on the screen all other items on the screen should not be enabled for selection or any other kind of editing. I tried to implement as above you suggested but that's not working. Please suggest how should I implement for this in my application.

Thanks and Regards,

Priya Modak



KP Kokila Poovendran Syncfusion Team July 6, 2023 12:12 PM UTC

Hi Foulont Gaetan,


You can achieve your requirement using cssClass 'e-spin-overlay' in `createSpinner` method.  Please find the code snippet and sample attached for your reference.

 createSpinner({
      // Specify the target for the spinner to show
      target: document.getElementById('container'as any,
      cssClass: 'e-spin-overlay',
    });
Sample: 

https://stackblitz.com/edit/angular-za9tpj-s52fqh?file=src%2Fapp.component.html,src%2Fapp.component.ts,src%2Fapp.component.css


Regards,

Kokila Poovendran.

BS

Loader.
Up arrow icon