Flarum (2.x)
    Preparing search index...
    interface IUserSelectionModalAttrs {
        animateHide: (closedCallback?: () => void) => void;
        animateShow: (readyCallback?: () => void) => void;
        excluded?: (string | number)[] | ((user: User) => boolean);
        maxItems?: number;
        onsubmit: (users: User[]) => void;
        selected: User[];
        state: ModalManagerState;
        title?: string;
        unavailable?: (user: User) => Children;
    }

    Hierarchy (View Summary)

    Index
    animateHide: (closedCallback?: () => void) => void

    Type Declaration

      • (closedCallback?: () => void): void
      • Animates the current modal out, then closes it.

        closedCallback runs when the hide animation ends, or after its CSS duration if no transition event arrives. If the modal is closed some other way before then, such as by a page change (Page closes any open modal) or by a non-stacked modal replacing it, its dialog is removed, the animation never ends and closedCallback does not run. It is not run in that case because whatever closed the modal may already have moved on: a callback that changes the route, for example, would close the new modal too.

        Parameters

        • closedCallback: () => void = ...

        Returns void

    animateShow: (readyCallback?: () => void) => void
    excluded?: (string | number)[] | ((user: User) => boolean)

    Users left out of the list: their IDs, or a check that returns true for each one.

    maxItems?: number
    onsubmit: (users: User[]) => void
    selected: User[]
    title?: string
    unavailable?: (user: User) => Children

    Why a user can't be selected, shown in their place in the list; nothing when they can be.