Use data type configuration to determine default value for empty toggle and slider property values (#17854)
* Use data type configuration to determine default value for empty toggle property values. * Added/updated unit tests. * Fixed failing integration tests. * Applied similar default value display for the slider property editor and aligned implementation of true/false with this. * Fixed unit tests. * Removed "duplicate" JsonPropertyName attributes and added a custom TypeInfoResolver for data type configuration so we can re-use the existing ConfigurationField attributes. * Minor cleanup --------- Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
This commit is contained in:
@@ -137,7 +137,7 @@ public class DataTypeBuilder
|
||||
var sortOrder = _sortOrder ?? 0;
|
||||
var serializer = new SystemTextConfigurationEditorJsonSerializer();
|
||||
|
||||
return new DataType(editor, serializer, parentId)
|
||||
var dataType = new DataType(editor, serializer, parentId)
|
||||
{
|
||||
Id = id,
|
||||
Key = key,
|
||||
@@ -152,5 +152,7 @@ public class DataTypeBuilder
|
||||
DatabaseType = databaseType,
|
||||
SortOrder = sortOrder
|
||||
};
|
||||
|
||||
return dataType;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user