Hi,
When using aurelia-validation plugin in large collections (many scroll pages on mobile), is there any out-of-the-box solution for scrolling to the validation error? Or do I have to implement it myself?
The only workaround I found for it was to add and id on each row and then call myself scrollIntoView for the affected element:
let invalid = result.results.filter(n => !n.valid);
let first = invalid[0];
if (first.object instanceof QuizDbEntry) {
// Scroll to top
Utility.safeScrollIntoView(document.getElementById('quiz-header-row'))
} else {
let obj = first.object;
let idx = this.quizEntry.questions.indexOf(obj);
if (idx > -1) {
Utility.safeScrollIntoView(document.getElementById('quiz-question-row-' + (idx + 1)));
}
}