Trilium Frontend API
    Preparing search index...

    Type Alias FocusableView

    FocusableView: View & { focus(direction?: -1 | 1): void }

    A module:ui/view~View that can be focused (e.g. has focus() method).

    Type Declaration

    • focus: function
      • Focuses the view.

        Parameters

        • Optionaldirection: -1 | 1

          This optional parameter helps improve the UX by providing additional information about the direction the focus moved (e.g. in a complex view or a form). It is useful for views that host multiple focusable children (e.g. lists, toolbars):

          • 1 indicates that the focus moved forward and, in most cases, the first child of the focused view should get focused,
          • -1 indicates that the focus moved backwards, and the last focusable child should get focused

          See module:ui/focuscycler~FocusCycler#event:forwardCycle and module:ui/focuscycler~FocusCycler#event:backwardCycle to learn more.

        Returns void