Alert not working properly in my angular framework

Tags: #<Tag:0x00007f8b23e435a8>

Hi

I am using handsontable latest version inside my angular framework. I am using validation- code like
this.hotRegisterer.getInstance(this.id).validateCells((valid)

if valid false i am showing the alert message like
this.alert_snack.add(‘Give required fields’);z
this is my snacbarRef
this.snackBarRef = this.snackBar.open(message.message, message.action, {duration: 3000, verticalPosition: ‘top’,
panelClass: ‘matSuccess_position’});

which is default for my whole application what is the problem panel class matSuccess position is not applying properly.

My alert need to display at top in centre of the screen. But in handsontable page the message displaying in my left corner of screen. And the message hanged for so many minutes. likewise i am facing pblm. Any resolution for this?

Hi @tamileniyan66

I does not seem to be an issue strictly related to Handsontable. As I assume, you are looking for a method that can return the coordinates of the middle of the screen, but that seems to be pure JS. Here https://stackoverflow.com/questions/42576008/angular-2-get-position-of-html-element are some tips on how to position the element in Angular.

AtLast I found the issue by own. If I put my alert code inside validatecells() function this kind of issue occurring. So get a boolean value and done alert snackbar in outside of function. Now its working fine…

Thank you for the update, @tamileniyan66
I’m closing this thread as solved.