File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -514,6 +514,10 @@ function Update-PodeWebTextbox
514514 [string ]
515515 $Id ,
516516
517+ [Alias (' Height' )]
518+ [int ]
519+ $Size = 0 ,
520+
517521 [Parameter ()]
518522 [switch ]
519523 $AsJson ,
@@ -542,6 +546,7 @@ function Update-PodeWebTextbox
542546 Value = $items
543547 ID = $Id
544548 Name = $Name
549+ Size = $Size
545550 AsJson = $AsJson.IsPresent
546551 Multiline = $Multiline.IsPresent
547552 }
Original file line number Diff line number Diff line change @@ -409,7 +409,7 @@ function setupSteppers() {
409409 btn = stepper . find ( '.bs-stepper-content .bs-stepper-pane.active button.step-submit' ) ;
410410 }
411411
412- if ( btn ) {
412+ if ( btn && ! isEnterKey ( e ) ) {
413413 btn . trigger ( 'click' ) ;
414414 }
415415 } ) ;
@@ -2795,6 +2795,9 @@ function updateTextbox(action) {
27952795 }
27962796
27972797 txt . val ( action . Value ) ;
2798+ if ( action . Multiline && action . Size > 0 ) {
2799+ txt [ 0 ] . rows = action . Size ;
2800+ }
27982801}
27992802
28002803function writeTextbox ( action , sender ) {
Original file line number Diff line number Diff line change 3131 $events = ConvertTo-PodeWebEvents -Events $data.Events
3232
3333 if ($data.Multiline) {
34- $element = "<textarea class='form-control $(if ($data.NoForm) { 'no-form' })' id='$($data.ID)' name='$($data.Name)' pode-object='$($data.ObjectType)' placeholder='$($data.Placeholder)' rows='$($data.Size)' style='$($width) $($data.CssStyles)' $($describedBy) $($readOnly) $($required) $($value) $($events)> </textarea>"
34+ $element = "<textarea class='form-control $(if ($data.NoForm) { 'no-form' })' id='$($data.ID)' name='$($data.Name)' pode-object='$($data.ObjectType)' placeholder='$($data.Placeholder)' rows='$($data.Size)' style='$($width) $($data.CssStyles)' $($describedBy) $($readOnly) $($required) $($events)> $($data.Value) </textarea>"
3535 }
3636 else {
3737 if ($data.Prepend.Enabled -or $data.Append.Enabled) {
You can’t perform that action at this time.
0 commit comments