lcollong
FabriKant d'applications web
got this error
elementlist.js:107 Uncaught TypeError: Cannot read properties of undefined (reading '_getSubElements')
at Object.<anonymous> (elementlist.js:107:39)
at HTMLFormElement.dispatch (jquery-3.6.0.min.js?8134c3d81f7aab475eac74c779894099:2:43064)
at v.handle (jquery-3.6.0.min.js?8134c3d81f7aab475eac74c779894099:2:41048)
which corresponds to this portion of the elementlist.js file :
sounds like 'that' is undefined at this moment.
The error raise on click event
elementlist.js:107 Uncaught TypeError: Cannot read properties of undefined (reading '_getSubElements')
at Object.<anonymous> (elementlist.js:107:39)
at HTMLFormElement.dispatch (jquery-3.6.0.min.js?8134c3d81f7aab475eac74c779894099:2:43064)
at v.handle (jquery-3.6.0.min.js?8134c3d81f7aab475eac74c779894099:2:41048)
which corresponds to this portion of the elementlist.js file :
JavaScript:
// As we are delegating the event, and reference to 'this' in the js will refer to the first element
// When in a repeat group we want to replace that with a reference to the current element.
elid = target.closest('.fabrikSubElementContainer').prop('id');
that = this.form.formElements[elid];
subEls = that._getSubElements();
if (target.length > 0 && subEls.contains(target[0])) {
// Replace this with that so that the js code runs on the correct element
The error raise on click event