We are using the Igx Spreadsheet in an angular component. If a user enters data that triggers a validation error (i.e. not a valid formula like =()), then the alert box shown below appears. The problem that we are having is that we have code wired up to the (focusout) event of the component to call ExitEditModeAndUpdateActiveCell.
it's this code here: this.spreadsheet.executeAction(SpreadsheetAction.ExitEditModeAndUpdateActiveCell)
this is because our Save button is located outside the component and this catches the situation where someone types something (never leaves the cell) and then clicks out of the component to Save. Apparently (and unfortunately), the Igx Spreadsheet does not ExitEditModeAndUpdate if focus is lost outside of the component.
Hello Krista,
I have been investigating into the behavior you are seeing, and in order to prevent the alert box from being displayed, you can utilize the userPromptDisplaying event and set the event arguments’ displayMessage property to false. This should prevent the infinite loop you are seeing from the focusout event. An alternative in this case could also be to set a flag in the userPromptDisplaying event that you can check in the focusout event so that you can prevent the infinite loop.
Another alternative could be to instead call the ExitEditModeAndUpdateActiveCell in your save button prior to doing your save operation rather than doing this in focusout. This too, should avoid the infinite loop you are seeing in the case of the user prompt displaying and firing focusout again.
Please let me know if you have any other questions or concerns on this matter.