I’ve promised to present an improved version of the
OutlinePicker shown in this post and here it is. What did I do?
- The parameter list changed a little bit. Now there’s a special title for „No Selection“ and we do not need the
isExpandedparameter anymore since we want to expand the nodes automatically according to the selection.
- I’ve introduced the new array
nodesToExpand. I’ll come back to that a little bit later.
- Instead of a sheet the selection view is presented as a popover (
WithPopoverfrom this post). Using that we do not need a close button anymore.
- The NodeOutlineGroup from this post is used to accept the array of expanded nodes.
- Instead of a
FormI use a
Listhere with a plain
listStyle. That looks better in the popover view.
- The „No Selection“ section is now separated from the list in a similar manner as a
Dividerwould do it in a