Skip to content
This repository has been archived by the owner on Jan 4, 2025. It is now read-only.

Fix for #694 #1036

Merged
merged 2 commits into from
Aug 21, 2019
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace UniversalDashboard.Cmdlets.Inputs
{
[Cmdlet(VerbsCommon.New, "UDInputField")]
[Cmdlet(VerbsCommon.New, "UDInputField")]
public class NewInputFieldCommand : PSCmdlet
{
[Parameter(Mandatory = true)]
Expand Down Expand Up @@ -44,6 +44,10 @@ public class NewInputFieldCommand : PSCmdlet
private readonly Logger Log = LogManager.GetLogger(nameof(NewInputFieldCommand));
protected override void EndProcessing()
{
if (Type == "select" && (null == DefaultValue || DefaultValue.ToString() == "") && Values.Count() >= 0)
{
DefaultValue = Values[0];
}
var field = new Field
{
Name = Name,
Expand Down