splitViewHandle
The split view's part of a divider, beside resizeHandle().
import { splitViewHandle } from "@sdxc/ui/app";Usage
The split view's part of a divider, beside resizeHandle(): measures the panes before a
drag starts, remembers the settled layout, moves the divider with ←/→, and collapses or
restores the pane before it with Enter. Put it before resizeHandle() in mix.
Signature
splitViewHandle(pane: SplitViewPane): MixinDescriptor<HTMLElement>Returns a mixin descriptor for the divider.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
pane | SplitViewPane | Yes | The pane before the divider, which Enter collapses. |
Examples
<div data-resizable-handle mix={[splitViewHandle("list"), resizeHandle("horizontal", session)]} />Used with it
The events, constants and types its module publishes, each imported from @sdxc/ui/app too.
SPLIT_VIEW_ITEM_ATTRIBUTE
Attribute an app puts on each list link j/k steps through, in list order.
const SPLIT_VIEW_ITEM_ATTRIBUTE = "data-split-view-item"setSplitViewCollapsed
Collapses or restores pane and remembers it. The list and the detail never both
collapse: collapsing one brings the other back, so the view always shows a record.
setSplitViewCollapsed(root: HTMLElement, pane: SplitViewPane, collapsed: boolean): void| Parameter | Type | Required | Description |
|---|---|---|---|
root | HTMLElement | Yes | The split view. |
pane | SplitViewPane | Yes | The pane to change. |
collapsed | boolean | Yes | Whether it ends collapsed. |
SplitViewKeyScope
Where a split view's j/k answer: "page" anywhere in the document, "view" only while
focus is inside the view, for a view shown on a page whose own keys come first.
type SplitViewKeyScope = "page" | "view"