CE-938: updated to get filter and column setup values from widget data, rather than 'default values'

This commit is contained in:
Tim Chamberlain
2024-06-04 13:43:39 -05:00
parent c3503a719f
commit a778b7497a
10 changed files with 70 additions and 67 deletions

View File

@ -396,15 +396,16 @@ function EntityForm(props: Props): JSX.Element
// if the widget metadata specifies a table name, set form values to that so widget knows which to use //
// (for the case when it is not being specified by a separate field in the record) //
/////////////////////////////////////////////////////////////////////////////////////////////////////////
if (widgetMetaData?.defaultValues?.has("tableName"))
if (widgetData?.tableName)
{
formValues["tableName"] = widgetMetaData?.defaultValues.get("tableName");
formValues["tableName"] = widgetData?.tableName;
}
return <FilterAndColumnsSetupWidget
key={formValues["tableName"]} // todo, is this good? it was added so that editing values actually re-renders...
isEditable={true}
widgetMetaData={widgetMetaData}
widgetData={widgetData}
recordValues={formValues}
onSaveCallback={setFormFieldValuesFromWidget}
/>;