NodeLabeled
Sourceimport type { NodeLabeled } from "@prestojs/util";
Interface for items that provide a React node label (anything that React can render). Implementing this can save you having to pass explicit functions to label an item in other parts of the system (eg. for AsyncChoices)
See isNodeLabeled and getNodeLabel.
API
Methods
getNodeLabel()
SourceReturn the node label for this item. This can be anything renderable by React.
See isNodeLabeled to test for support and getNodeLabel for easiest way to get the label.
Returns