mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-18 05:10:45 +00:00
Fix firstRender accidental delete; pass apiName, version to qController.testScript
This commit is contained in:
@ -70,6 +70,11 @@ function ScriptTestForm({scriptId, scriptDefinition, tableName, fieldName, recor
|
||||
const [testException, setTestException] = useState(null as string)
|
||||
const [firstRender, setFirstRender] = useState(true);
|
||||
|
||||
if(firstRender)
|
||||
{
|
||||
setFirstRender(false);
|
||||
}
|
||||
|
||||
if(firstRender)
|
||||
{
|
||||
scriptDefinition.testInputFields.forEach((field: QFieldMetaData) =>
|
||||
@ -108,6 +113,8 @@ function ScriptTestForm({scriptId, scriptDefinition, tableName, fieldName, recor
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// associated record scripts - run this way (at least for now) //
|
||||
/////////////////////////////////////////////////////////////////
|
||||
inputValues.set("apiName", apiName);
|
||||
inputValues.set("apiVersion", apiVersion);
|
||||
output = await qController.testScript(tableName, recordId, fieldName, code, inputValues);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user