-
Hi A recent module release introduced columnVisibility feature that allow users to choose display columns. By default, customisations are preserved between sessions (e.g. if we close and re-open browser, it will remember column visibility selecton). Question: how do I pre-select column visibility? The following code displays all 10 columns initially: $table = @(
(1..10).ForEach{ $row = [ordered]@{}; (1..10).ForEach{ $row.Add("A$_",'x'*$_) }; [PSCustomObject]$row }
)
New-HTML -Online -Temporary -ShowHTML {
New-HTMLTable -Table $table -Buttons columnVisibility
} It remembers my customisations: How do I pre-select only specific columns to be visible by default? |
Beta Was this translation helpful? Give feedback.
Answered by
shivtorov
Sep 5, 2023
Replies: 1 comment
-
Figured out the solution: $table = @(
(1..10).ForEach{ $row = [ordered]@{}; (1..10).ForEach{ $row.Add("A$_",'x'*$_) }; [PSCustomObject]$row }
)
New-HTML -Online -Temporary -ShowHTML {
New-HTMLTable -Table $table -Buttons columnVisibility {
New-TableColumnOption -ColumnIndex @(5..9) -Hidden $true
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
shivtorov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Figured out the solution: