displayRender sets the text in the closed field. It gets the path's labels and, as a second argument, the option objects behind them. The default joins the labels with / , and in multiple mode keeps only the last label per tag, which is where a custom renderer helps most.
- Shorten a long path here rather than by truncating with CSS: the renderer knows which cells matter and a text overflow does not.
- You can return a node, like a tag or a flag with the text, but keep the words in it. The field is what a screen reader reads back.
- optionRender does the same for one row inside a column of the popup. The two props are independent.
expandTrigger decides what opens the next column. The default is click, which also works on touch, where there is no hover.
- hover is faster for a deep tree on a mouse, and it is the wrong default for a form a phone will ever see.
- Pick one and keep it across a view, since it changes how a click behaves.
The popup renders in a portal, so a descendant selector on the field does not reach it. Style it through classNames.popup.root.