Skip to content

OCGV: If items are selected, then a filter is applied, items now hidden stay selected #121

@tig

Description

@tig

What does Filter do?

  1. Filter means Filter DISPLAY - Restrict what you see (current implementation).
  2. Filter means Filter INPUT - Restrict the data you are working with.

Example:

Get-PSProfile | Out-ConsoleGridView -OutputMode Multiple -Title 'PS Profiles'

Select the two items:
image
image

Change the filter to "ISE":
image

Select the first ISE item:
image

Hit ENTER to Accept.

Note three items are returned:
image

Thus, today, the Filter only impacts what is displayed.

Is this the right behavior?

I could argue it either way, but being explicit is going to be more important as ocgv gains more functionality (e.g. See my Select-All issue #120). I also have dreams of a cmdlet that makes editing data easy via console GUI. It seems to me we'd want the model to be consistent (or at least explicitly inconsistent).

Note, ogv works differently. If you select things in -OutputMode Multiple mode, and then change the filter, those selections are cleared. One could also argue that ocgv should match ogv here, which means it should use "Filter Means Filter INPUT" (2).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions