mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-18 13:20:43 +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 [testException, setTestException] = useState(null as string)
|
||||||
const [firstRender, setFirstRender] = useState(true);
|
const [firstRender, setFirstRender] = useState(true);
|
||||||
|
|
||||||
|
if(firstRender)
|
||||||
|
{
|
||||||
|
setFirstRender(false);
|
||||||
|
}
|
||||||
|
|
||||||
if(firstRender)
|
if(firstRender)
|
||||||
{
|
{
|
||||||
scriptDefinition.testInputFields.forEach((field: QFieldMetaData) =>
|
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) //
|
// 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);
|
output = await qController.testScript(tableName, recordId, fieldName, code, inputValues);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user