UNPKG

amisa-forms

Version:
21 lines (20 loc) 791 B
import { BaseElementFactory } from "../BaseElementFactory"; export class validationTabbing { constructor(tabbing, currentElementFactory) { this.tabbing = tabbing; this.currentElementFactory = currentElementFactory; this.gotoNextElement = () => { if (this.currentElementFactory instanceof BaseElementFactory) { this.currentElementFactory.goToNextTabIndexControl(); } else { this.tabbing.elementTabbing.focusNextElement(); } }; this.formFactory = tabbing.formFactory; } static gotoNextElement(tabbing, currentElementFactory) { const othersTabbing = new validationTabbing(tabbing, currentElementFactory); othersTabbing.gotoNextElement(); } }