You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the plugin to work we need to be able to make use of the MatrixInput JavaScript for each matrix field rendered on the page.
Craft stores reference to this class on the <div class="matrix-field ..."> element's DOM/$.data() so we can get access via:
varmatrixInput=$matrixField.data("matrix");
The problem is there is no guarantee that Craft has finished loading the MatrixInput for any particular class. For example, if you do this immediately on the page load, matrixInput is undefined. JQuery doesn't have any build in listener for this, nor does Craft seem to have any registration pattern that you can use to listen for when the input has stopped rendering. Therefore the best you can do is either delay, or do some sort of back-off check.
The text was updated successfully, but these errors were encountered:
For the plugin to work we need to be able to make use of the
MatrixInput
JavaScript for each matrix field rendered on the page.Craft stores reference to this class on the
<div class="matrix-field ...">
element's DOM/$.data()
so we can get access via:The problem is there is no guarantee that Craft has finished loading the
MatrixInput
for any particular class. For example, if you do this immediately on the page load,matrixInput
isundefined
. JQuery doesn't have any build in listener for this, nor does Craft seem to have any registration pattern that you can use to listen for when the input has stopped rendering. Therefore the best you can do is either delay, or do some sort of back-off check.The text was updated successfully, but these errors were encountered: