ShaunLawrie / PwshSpectreConsole

👻 PwshSpectreConsole is a PowerShell wrapper for the awesome Spectre.Console library
https://pwshspectreconsole.com/
MIT License
117 stars 7 forks source link

Possible feature request - Group Select a single object "Read-SpectreSelectionGrouped" and/or Format-SpectreTree with single selection and no select all #53

Closed kkerr2005 closed 4 weeks ago

kkerr2005 commented 1 month ago

Having lots of fun with this module , thank you so much for putting the time in to create something so awesome! I find this really useful for getting code out the door quickly to my users. :)

I'm just wondering if its possible to have a grouped selection of a single item rather than multiple or perhaps a tree view where I can select a single item?

Thanks

ShaunLawrie commented 4 weeks ago

Hi @kkerr2005, thanks for the thanks 😄

Are you asking for something like this? (I had to hack it up a bit to make this work but it's possible if that's what you're after)

https://github.com/user-attachments/assets/f8f551b6-4968-4e31-8526-ea635f2e62f8

Doing a full tree selection isn't supported in the .net library code so I think this is as close as I can get to what I think you're after.

kkerr2005 commented 4 weeks ago

That looks perfect, love a bit of hackery, thanks for the thanks for the thanks Shaun

🤣

ShaunLawrie commented 4 weeks ago

This is in the prerelease version at the moment. I have a bunch of work to do before it will hit main but in the meantime you can try it out with Update-Module PwshSpectreConsole -AllowPrerelease https://prerelease.pwshspectreconsole.com/reference/prompts/read-spectreselectiongrouped/