Open kort3x opened 5 years ago
Thanks for reporting. It seems to be a bug in DataTables. I'll investigate whether this can be addressed with some JS to clear this, if not I'll try to open bug report in DataTables.
Hrmms, how are you using it?
Import-Module PSWriteHTML.psd1 -Force
Import-Module PSSharedGoods -Force
if ($null -eq $Process) {
$Process = Get-Process | Select-Object -First 70
}
New-HTML -TitleText 'My title' -UseCssLinks:$true -UseJavaScriptLinks:$true -FilePath $PSScriptRoot\Example19.html -Verbose {
New-HTMLContent -HeaderText 'Test1' {
New-HTMLTable -DataTable $Process -PagingOptions @(50, 100, 150, 200) -Filtering -FilteringLocation Top {
New-HTMLTableCondition -Name 'HandleCount' -Type number -Operator gt -Value 300 -BackgroundColor Yellow
New-HTMLTableCondition -Name 'ID' -Type number -Operator gt -Value 16000 -BackgroundColor Green
New-HTMLTableCondition -Name 'Name' -Type string -Operator eq -Value 'browser_broker' -BackgroundColor Gold -Row
}
}
} -ShowHTML
Can't reproduce it? I type anything in filters, press F5 and it simply reloads. Also which browser? I tested in Google Chrome.
Ok, I see in Edge Chromium and Firefox this is what you describe. I'm using Chrome 75 and no such thing happens. Will try to find out why.
I'm using chrome 73
I have HTMLTabs in there, maybe that's the issue?
Here is a gist. I am to stupid to format PS code in the comments
https://gist.github.com/kort3x/3fb8f260cfc6f7f2bacb43b65b3a38ec
Nah, you can format code in comment by using 3x ``` at the begining and 3x at the end. https://help.github.com/en/articles/creating-and-highlighting-code-blocks
3x you mean
;)
Yes!
New-HTML -TitleText 'Software' -UseCssLinks:$true -UseJavaScriptLinks:$true -FilePath C:\inetpub\wwwroot\reports\software\softwareoverview\softwareoverview.html {
New-HTMLTab -TabName 'Licensed Software' {
New-HTMLContent {
New-HTMLTable -DataTable ($licensedSoftware | Select-Object Name,Version,Publisher,Computername,InstallDate,Collected) -PagingOptions @(100, 200) -Filtering -FilteringLocation Top
}
}
New-HTMLTab -TabName 'Freeware' {
New-HTMLContent {
New-HTMLTable -DataTable ($freeSoftware | Select-Object Name,Version,Publisher,Computername,InstallDate,Collected) -PagingOptions @(100, 200) -Filtering -FilteringLocation Top
}
}
}
ah, that's better
It seems I've fixed this error - at least I think so. Will be in next release. Feel free to reopen when needed.
looking good - thanks!
Hi, i see a very similar thing, (using 0.0.132 ver) When i use the '''New-HTMLTable''' '''-Filtering''' option, if you use any of those "per column" filters, upon page reload it will still be filtered until you touch that filter field ,do space and delete or similar.
Since this one seems to be marked as closed, shall i start a new thread for this?
On page reload, tables still get filtered but the search field is shown as empty.
Example:
Table filtered for "Acrobat"![image](https://user-images.githubusercontent.com/13918530/56149713-6f222380-5fad-11e9-9f89-b0e882d3e742.png)
After reloading the page, the filter is still applied but the search field is empty![image](https://user-images.githubusercontent.com/13918530/56149791-9d9ffe80-5fad-11e9-9af0-2e64addfaad1.png)
Placing the cursor in the search field and hitting "backspace" clears the invisible filter