Skip to content

Commit ea7793e

Browse files
Copilotdsmmcken
andauthored
docs: Add active_item_index example to ui.stack documentation (#1258)
Add active_item_index example of ui.stack to dashboard.md --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: dsmmcken <[email protected]> Co-authored-by: Don <[email protected]> Co-authored-by: dsmmcken <[email protected]>
1 parent 0259f4a commit ea7793e

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

plugins/ui/docs/components/dashboard.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,21 @@ dash_stack = ui.dashboard(
165165
)
166166
```
167167

168+
### Stack with an active item index
169+
170+
```python
171+
from deephaven import ui
172+
173+
dash_stack_active = ui.dashboard(
174+
ui.stack(
175+
ui.panel("A", title="A"),
176+
ui.panel("B", title="B"), # shown as active item
177+
ui.panel("C", title="C"),
178+
active_item_index=1,
179+
)
180+
)
181+
```
182+
168183
### Stack with nested tabs
169184

170185
```python
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"file":"components/dashboard.md","objects":{"dash_stack_active":{"type":"deephaven.ui.Dashboard","data":{"document":{"props":{"children":{"__dhElemName":"deephaven.ui.components.Stack","props":{"activeItemIndex":1,"children":[{"__dhElemName":"deephaven.ui.components.Panel","props":{"title":"A","direction":"column","alignItems":"start","gap":"size-100","overflow":"auto","padding":"size-100","children":"A"}},{"__dhElemName":"deephaven.ui.components.Panel","props":{"title":"B","direction":"column","alignItems":"start","gap":"size-100","overflow":"auto","padding":"size-100","children":"B"}},{"__dhElemName":"deephaven.ui.components.Panel","props":{"title":"C","direction":"column","alignItems":"start","gap":"size-100","overflow":"auto","padding":"size-100","children":"C"}}]}}},"__dhElemName":"deephaven.ui.components.Dashboard"},"state":"{}"}}}}

0 commit comments

Comments
 (0)