We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 085e622 commit 51051afCopy full SHA for 51051af
src/JsonEditorWidget.php
@@ -184,8 +184,8 @@ public function run()
184
$readyFunction = '';
185
$readyFunction .= "{$widgetId}.on('change', function() { document.getElementById('{$inputId}').value = JSON.stringify({$widgetId}.getValue()); });\n";
186
if ($this->disabled) {
187
- // Disabled last added json editor
188
- $readyFunction .= 'window.jsonEditors.slice(-1)[0].disable()';
+ // Disabled current added json editor
+ $readyFunction .= "window['$widgetId'].disable()";
189
}
190
$widgetJs .= "{$widgetId}.on('ready', function() {\n{$readyFunction}\n});";
191
0 commit comments