You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We recently enabled exactOptionalPropertyTypes for our code base because we had a bug that could have been prevented if that flag was enabled in our tsconfig.json. We've fixed some of the issues caused by enabling this flag now and now we found it caused a problem with when we pass undefined as a property to <FloatingFocusManager>.
We have this code in our codebase and this is a issue because the type for initialFocus is doesn't contain an explicit undefined.
hornta
changed the title
Support for using with exactOptionalPropertyTypes enabled
Better support for using with exactOptionalPropertyTypes enabled
Mar 15, 2024
We recently enabled
exactOptionalPropertyTypes
for our code base because we had a bug that could have been prevented if that flag was enabled in our tsconfig.json. We've fixed some of the issues caused by enabling this flag now and now we found it caused a problem with when we pass undefined as a property to<FloatingFocusManager>
.We have this code in our codebase and this is a issue because the type for
initialFocus
is doesn't contain an explicitundefined
.We can get around this problem by moving some code around like below but it's not pretty.
I can provide a PR to make it easier for code bases using
exactOptionalPropertyTypes
to use floating-ui.The text was updated successfully, but these errors were encountered: