File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-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 = 4 ,
520
+
517
521
[Parameter ()]
518
522
[switch ]
519
523
$AsJson ,
@@ -536,12 +540,17 @@ function Update-PodeWebTextbox
536
540
$items = ($items | Out-String )
537
541
}
538
542
543
+ if ($Size -le 0 ) {
544
+ $Size = 4
545
+ }
546
+
539
547
return @ {
540
548
Operation = ' Update'
541
549
ObjectType = ' Textbox'
542
550
Value = $items
543
551
ID = $Id
544
552
Name = $Name
553
+ Size = $Size
545
554
AsJson = $AsJson.IsPresent
546
555
Multiline = $Multiline.IsPresent
547
556
}
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 ( Number . isInteger ( action . Size ) ) {
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) $($value) $($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