SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

splitViewHandle

The split view's part of a divider, beside resizeHandle().

tsx
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

typescript
splitViewHandle(pane: SplitViewPane): MixinDescriptor<HTMLElement>

Returns a mixin descriptor for the divider.

Parameters

ParameterTypeRequiredDescription
paneSplitViewPaneYesThe pane before the divider, which Enter collapses.

Examples

tsx
<div data-resizable-handle mix={[splitViewHandle("list"), resizeHandle("horizontal", session)]} />

The events, constants and types its module publishes, each imported from @sdxc/ui/app too.

Constant

SPLIT_VIEW_ITEM_ATTRIBUTE

Attribute an app puts on each list link j/k steps through, in list order.

typescript
const SPLIT_VIEW_ITEM_ATTRIBUTE = "data-split-view-item"
Function

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.

typescript
setSplitViewCollapsed(root: HTMLElement, pane: SplitViewPane, collapsed: boolean): void
ParameterTypeRequiredDescription
rootHTMLElementYesThe split view.
paneSplitViewPaneYesThe pane to change.
collapsedbooleanYesWhether it ends collapsed.
Type

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.

typescript
type SplitViewKeyScope = "page" | "view"
@sdxc/ui

Can’t find it? Contact us