Skip to content

@floating-ui/core@1.0.2

Compare
Choose a tag to compare

Bug Fixes

  • fix: if the reference or floating elements are falsy/null when computePosition() is called there's an unhelpful error about getComputedStyle; there is now a proper error message in dev mode. (#1954)

  • fix: the middleware array can now contain false, null, or undefined values. This enables you to pass conditional middleware inline without needing a verbose spread ...(cond ? [m()] : []) or separate statements like .push() — at least for TypeScript, as you could already filter it manually externally. (#1954)

    middleware: [
      shouldFlip && flip(),  
      arrowElement && arrow({ element: arrowElement }),
    ]