Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions src/Umbraco.Infrastructure/PropertyEditors/MultipleValueEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,6 @@ public MultipleValueEditor(
: base(localizedTextService, shortStringHelper, jsonSerializer, ioHelper, attribute) =>
_jsonSerializer = jsonSerializer;

/// <summary>
/// Override so that we can return an array to the editor for multi-select values
/// </summary>
/// <param name="property"></param>
/// <param name="culture"></param>
/// <param name="segment"></param>
/// <returns></returns>
public override object ToEditor(IProperty property, string? culture = null, string? segment = null)
{
var json = base.ToEditor(property, culture, segment)?.ToString();
string[]? result = null;
if (json is not null)
{
result = _jsonSerializer.Deserialize<string[]>(json);
}

return result ?? Array.Empty<string>();
}

/// <summary>
/// When multiple values are selected a json array will be posted back so we need to format for storage in
/// the database which is a comma separated string value
Expand Down