Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve falsy value handling #1954

Merged
merged 3 commits into from
Nov 12, 2022
Merged

fix: improve falsy value handling #1954

merged 3 commits into from
Nov 12, 2022

Conversation

atomiks
Copy link
Collaborator

@atomiks atomiks commented Nov 12, 2022

No description provided.

@rollingversions
Copy link

rollingversions bot commented Nov 12, 2022

@floating-ui/core (1.0.1 → 1.0.2)

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.

  • 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.

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

@floating-ui/dom (1.0.4 → 1.0.5)

Bug Fixes

  • fix: support falsy values in middleware option for conditionals

@floating-ui/react-dom (1.0.0 → 1.0.1)

Bug Fixes

  • fix: support falsy values in middleware option for conditionals

@floating-ui/react-dom-interactions (0.10.3 → 0.10.4)

Bug Fixes

  • fix: support falsy values in middleware option for conditionals

@floating-ui/react-native (0.8.0 → 0.8.1)

Bug Fixes

  • fix: support falsy values in middleware option for conditionals

Edit changelogs

@netlify
Copy link

netlify bot commented Nov 12, 2022

Deploy Preview for vibrant-gates-22c214 canceled.

Name Link
🔨 Latest commit f8aa6e8
🔍 Latest deploy log https://app.netlify.com/sites/vibrant-gates-22c214/deploys/636fb2dd4d725200093df954

@atomiks atomiks merged commit dce5565 into master Nov 12, 2022
@atomiks atomiks deleted the fix/qol branch November 12, 2022 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant