File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -514,6 +514,10 @@ function Update-PodeWebTextbox
514
514
[string ]
515
515
$Id ,
516
516
517
+ [Alias (' Height' )]
518
+ [int ]
519
+ $Size = 0 ,
520
+
517
521
[Parameter ()]
518
522
[switch ]
519
523
$AsJson ,
@@ -542,6 +546,7 @@ function Update-PodeWebTextbox
542
546
Value = $items
543
547
ID = $Id
544
548
Name = $Name
549
+ Size = $Size
545
550
AsJson = $AsJson.IsPresent
546
551
Multiline = $Multiline.IsPresent
547
552
}
Original file line number Diff line number Diff line change @@ -409,7 +409,7 @@ function setupSteppers() {
409
409
btn = stepper . find ( '.bs-stepper-content .bs-stepper-pane.active button.step-submit' ) ;
410
410
}
411
411
412
- if ( btn ) {
412
+ if ( btn && ! isEnterKey ( e ) ) {
413
413
btn . trigger ( 'click' ) ;
414
414
}
415
415
} ) ;
@@ -2795,6 +2795,9 @@ function updateTextbox(action) {
2795
2795
}
2796
2796
2797
2797
txt . val ( action . Value ) ;
2798
+ if ( action . Multiline && action . Size > 0 ) {
2799
+ txt [ 0 ] . rows = action . Size ;
2800
+ }
2798
2801
}
2799
2802
2800
2803
function writeTextbox ( action , sender ) {
Original file line number Diff line number Diff line change 31
31
$events = ConvertTo-PodeWebEvents -Events $data.Events
32
32
33
33
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>"
35
35
}
36
36
else {
37
37
if ($data.Prepend.Enabled -or $data.Append.Enabled) {
You can’t perform that action at this time.
0 commit comments