weasel API - v0.8.0
    Preparing search index...

    Function canBringForward

    • True iff bringForward(list, ids) would change list — i.e. at least one id in ids is present in list AND has a non-moving (non-ids) neighbor above it. Mirrors the swap rule in bringForward: a moving id only swaps up when its upper neighbor isn't also moving, so a contiguous block at the top is correctly reported as "can't move forward".

      Use this to drive button-disabled state in toolbars / menus so the user never fires a no-op reorder onto the undo stack.

      Parameters

      • list: string[]
      • ids: string[]

      Returns boolean