Skip to content
Snippets Groups Projects
Commit 3a3cef0a authored by jojohoch's avatar jojohoch
Browse files

[player] Improve event handling on 'NavigationDenied'

Show warning messages of input fields at event 'NavigationDenied' only
if reason "responsesIncomplete" is sent
parent de6e7745
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@ Player
- Color the disabled progress bar of the media player green
- Fix the section from being placed in front of elements with negative z-index
- Fix saving of drop list elements
- Show warning messages of input fields at event 'NavigationDenied' only if reason "responsesIncomplete" is sent
1.12.0
- Use fixed size property for dynamic button, drop-list and text-field components
......
......@@ -126,7 +126,9 @@ export class UnitStateComponent implements OnInit, OnDestroy {
console.log('player: onNavigationDenied', message);
const reasons = message.reason?.map((reason: string) => this.translateService.instant(reason));
this.messageService.showWarning(reasons?.join(', ') || this.translateService.instant('noReason'));
this.form.markAllAsTouched();
if (message.reason && message.reason.find(reason => reason === 'responsesIncomplete')) {
this.form.markAllAsTouched();
}
}
private addGroup = (group: ChildFormGroup): void => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment