Skip to content

Commit

Permalink
Merge pull request #1036 from oitptobbe/master
Browse files Browse the repository at this point in the history
Fix for #694
  • Loading branch information
adamdriscoll authored Aug 21, 2019
2 parents 78b59b5 + acbc512 commit c29439c
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 c29439c

Please sign in to comment.