mirror of
https://github.com/psychopy/psychojs.git
synced 2025-05-12 08:38:10 +00:00
core/GUI: save whole element ids in required keys
This commit is contained in:
parent
004a5c96ec
commit
79461914bc
@ -161,7 +161,7 @@ export class GUI
|
||||
// if the field is required:
|
||||
if (key.slice(-1) === '*')
|
||||
{
|
||||
self._requiredKeys.push(key);
|
||||
self._requiredKeys.push(keyId);
|
||||
}
|
||||
|
||||
// if value is an array, we create a select drop-down menu:
|
||||
@ -219,9 +219,8 @@ export class GUI
|
||||
|
||||
|
||||
// setup change event handlers for all required keys:
|
||||
Object.keys(this._requiredKeys).forEach((key, keyIdx) =>
|
||||
this._requiredKeys.forEach((keyId) =>
|
||||
{
|
||||
const keyId = 'form-input-' + keyIdx;
|
||||
const input = document.getElementById(keyId);
|
||||
if (input)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user