Pode.Web icon indicating copy to clipboard operation
Pode.Web copied to clipboard

New-PodeWebTextbox -NoForm shows the button on a new line

Open tinuwalther opened this issue 1 year ago • 2 comments

Describe the Bug

In a PodeWebForm, the New-PodeWebTextbox parameter -NoForm -Width '960px' does not work correct as in v0.8.2. It shows the buttons on a new line.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install-Module Pode.Web -RequiredVersion 0.8.3 -Force
  2. Create the PodeServer
  3. Add a page with a New-PodeWebContainer, a New-PodeWebForm, New-PodeWebTextbox -NoForm -Width '960px' or smaller
  4. Start the Pode and see the behavior

Expected Behavior

The Input-field and the buttons should be placed at the same line as in the v0.8.2.

Screenshots

See at PSXiDiag-Project

Platform

  • OS: Windows
  • Browser: Edge, Firefox
  • Versions:
    • Pode: 2.8.0
    • Pode.Web: 0.8.3
    • PowerShell: PS 7.3.6

Additional Context

Here is my code, that I use:

#region Search
New-PodeWebForm -Id "Form$($i)" -Name "Search for ESXiHost" -AsCard -ShowReset -ArgumentList @($Properties, $PodeDB, $SqlTableName) -ScriptBlock {
    param($Properties, $PodeDB, $SqlTableName)
    $SqliteQuery = "Select * from $($SqlTableName) Where HostName Like '%$($WebEvent.Data.Search)%'"
    $Properties += 'vCenterServer'
    Invoke-MySQLiteQuery -Path $PodeDB -Query $SqliteQuery | Select-Object $Properties | Out-PodeWebTable
} -Content @(
    New-PodeWebTextbox -Id "Search$($i)" -Name 'Search' -DisplayName 'HostName' -Type Text -Placeholder 'HostName' -NoForm -Width '960px' 
)
#endregion

tinuwalther avatar Jul 29 '23 13:07 tinuwalther

Hi @tinuwalther,

I'll have to see how this renders in v1.0.0, and what could be done there. However, in v0.8.3 you can get around this by adding the original missing class via -CssClass:

New-PodeWebTextbox -Id "Search$($i)" -Name 'Search' -DisplayName 'HostName' -Type Text -Placeholder 'HostName' -NoForm -Width '960px' -CssClass 'no-form'

Hope that helps!

Badgerati avatar Aug 19 '23 21:08 Badgerati

Hi @Badgerati, that works fine for me. Thank you very much you for your help.

tinuwalther avatar Aug 27 '23 12:08 tinuwalther