Skip to content

Commit

Permalink
Fix for #694
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Fredriksson committed Aug 21, 2019
1 parent 9aabd3e commit acbc512
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit acbc512

Please sign in to comment.