Conversation
PR57f85591
|
Hey @ittchmh, I should be able to review this tomorrow, one quick thing though, could you update the PR to point at the develop branch? :) |
|
|
||
| if ($data.Multiline) { | ||
| $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>" | ||
| $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>" |
There was a problem hiding this comment.
Probably worth removing the $($value) property being set here.
src/Public/Outputs.ps1
Outdated
| [Alias('Height')] | ||
| [int] | ||
| $Size = 4, |
There was a problem hiding this comment.
I'd make it so the default here is 0, so we can skip updating the textarea if no Size is passed.
src/Public/Outputs.ps1
Outdated
| if ($Size -le 0) { | ||
| $Size = 4 | ||
| } |
There was a problem hiding this comment.
Can remove this part if default size is 0.
| if (Number.isInteger(action.Size)) { | ||
| txt[0].rows = action.Size; | ||
| } |
There was a problem hiding this comment.
The Size parameter is an [int] so the Number check isn't needed. It was also be worth checking that the textbox is a textarea as well, something like:
if (action.Multiline && action.Size > 0) {
txt[0].rows = action.Size;
}| } | ||
|
|
||
| if (btn) { | ||
| if (btn && !isEnterKey(e)) { |
There was a problem hiding this comment.
is the !isEnterKey(e) needed here? As ~9 lines up we do the same check and return 🤔
|
Hey @Badgerati, I tried to switch to develop brunch and revert master, but something was done wrong by me. 😕 |

Description of the Change
Updates: