Usage notes
The result is the shared selection model used by clip inspectors, track headers, grouping controls, clipboard commands, and edit toolbars. It includes both primary selection fields and multi-selection arrays so product chrome can avoid re-deriving selection from raw tracks.
Signature
Interface UseTimelineSelectionResultProperties
| Name | Signature | Description |
|---|---|---|
clearSelection | (): TimelineCommandResult | Clears both clip and track selection. |
hasSelection | hasSelection: boolean | Whether any clip or track is selected. |
selectClip | (clipId: string | null): TimelineCommandResult | Selects a clip by id, or clears clip selection when passed null. |
selectClips | (clipIds: typeOperator): TimelineCommandResult | Selects multiple clips by id, clearing clips not included. |
selectedClip | selectedClip: object | null | Currently selected clip, or null when no clip is selected. |
selectedClipId | selectedClipId: string | null | ID of the currently selected clip, or null when no clip is selected. |
selectedClipIds | selectedClipIds: string[] | IDs of all selected clips in track order. |
selectedClips | selectedClips: object[] | All selected clips in track order. |
selectedClipTrackId | selectedClipTrackId: string | null | ID of the track containing the selected clip, or null when no clip is selected. |
selectedGroup | selectedGroup: { clipIds: typeOperator; id: string; label: string } | null | Selected group when the primary selected clip belongs to one. |
selectedGroupId | selectedGroupId: string | null | Selected group id when the primary selected clip belongs to one. |
selectedTrack | selectedTrack: object | null | Currently selected track, or null when no track row is selected. |
selectedTrackId | selectedTrackId: string | null | ID of the currently selected track, or null when no track row is selected. |
selectTrack | (trackId: string | null): TimelineCommandResult | Selects a track by id, or clears track selection when passed null. |
toggleClipSelection | (clipId: string, selected?: boolean): TimelineCommandResult | Toggles one clip in the current multi-selection. |