deephaven / deephaven-plugins

Deephaven Plugins
5 stars 12 forks source link

docs: item #531

Closed ethanalvizo closed 2 weeks ago

ethanalvizo commented 1 month ago

Closes #496

https://github.com/adobe/react-spectrum/blob/main/packages/%40react-types/shared/src/collections.d.ts Only added docs from ItemProps. Not sure if I needed to add props from Node interface as well

Also wanted to verify the expected behaviour for the title prop. In something like a picker component, the title of an item renders rather than the children passed in if defined. This made sense to me just wanted to make sure it's the behaviour desired.

Sample code:

import deephaven.ui as ui

# simple picker that takes ui.items and is uncontrolled
picker1 = ui.picker(
    ui.item("Option 1", has_child_items=True,title="test"),
    ui.item("Option 2"),
    ui.item("Option 3"),
    ui.item("Option 4"),
    default_selected_key="Option 2"
)
image