Correct way to hide sidebar after selection.

In a triple-column split view, it's common to hide the primary view when the user selects an item from a list.

In some cases, the supplemental view is also hidden when an item is selected from that list, thus leaving only the detail view visible.

What is the correct way to hide the primary view on selection and then to optionally hide the supplemental view on selection using the new NavigationStack?

(Notes is a good example of the sidebars hiding after the user selects a folder in the sidebar.)

Looks like it's as simple as attached a binder to columnVisibility in the NavigationStackView initializer and setting an appropriate column visibility value as needed.

Correct way to hide sidebar after selection.
 
 
Q