Releases: floating-ui/floating-ui
Releases · floating-ui/floating-ui
@floating-ui/react@0.26.16
Patch Changes
- fix(useListNavigation): correct
scrollIntoView
andfocus
behavior with virtual focus and inner DOM-focused element +FloatingList
- fix(FloatingPortal): prevent
undefined
id with unconditional rendering in React <18 - fix(useListNavigation): prevent
selectedIndex
changes from stealing focus - fix(FloatingDelayGroup): prevent hydration error with Suspense
- fix(useListNavigation, Composite): correct index calculations for grid navigation with nullish and disabled items when
disabledIndices
is inferred - perf(markOthers): avoid applying attributes to
script
tags needlessly - Update dependencies:
@floating-ui/react-dom@2.1.0
@floating-ui/react-native@0.10.6
Patch Changes
- fix(types): re-export all missing core types
- feat: support dependency array as a second argument of all middleware. This ensures stateful options can be kept reactive when making them derived (passing a function that returns the options):
const [value, setValue] = React.useState(0);
const offset1 = offset(value); // reactive
const offset2 = offset(() => value); // NOT reactive
const offset3 = offset(() => value, [value]); // reactive
This also includes size
's apply
function:
size(
{
apply() {
value; // reactive
},
},
[value],
);
@floating-ui/react-dom@2.1.0
Minor Changes
- feat: support dependency array as a second argument of all middleware. This ensures stateful options can be kept reactive when making them derived (passing a function that returns the options):
const [value, setValue] = React.useState(0);
const offset1 = offset(value); // reactive
const offset2 = offset(() => value); // NOT reactive
const offset3 = offset(() => value, [value]); // reactive
This also includes size
's apply
function:
size(
{
apply() {
value; // reactive
},
},
[value],
);
@floating-ui/react@0.26.15
Patch Changes
- fix(useTransitionStatus): guard
isMounted
check and remove unneeded initiated state. Prevents an infinite loop when called in a component with an unstable callback ref.
@floating-ui/core@1.6.2
Patch Changes
- fix(size): correctly constrain floating element to avoid overflowing outside viewport with
shift({crossAxis: true})
@floating-ui/react@0.26.14
Patch Changes
- feat: add
useFloatingRootContext
Hook, which enables calling interaction hooks in a component higher in the tree thanuseFloating
is called in. This supports spreading reference props onto an "external" reference element. External reference documentation.
@floating-ui/dom@1.6.5
Patch Changes
- fix: correctly calculate
<svg>
arrow elementoffsetParent
. Fixes arrow positioning when styling an inner element of the floating element with a border. - fix: ignore
clippingAncestors
collision boundary for top layer elements - fix(types): correct
OffsetOptions
alias
@floating-ui/utils@0.2.2
Patch Changes
- fix: avoid spreading rects to support
DOMRect
types
@floating-ui/react@0.26.13
Patch Changes
- fix(FloatingFocusManager): return focus to reference when applicable even if not focused on open
- fix(types): simplify React types
- fix(types): replace
React_2
withReact
in generated .d.ts files - fix(types): revert
React.JSX.Element
back toJSX.Element
- fix(useHover):
restMs
+ nullish open delay should respectrestMs
@floating-ui/react-native@0.10.5
Patch Changes
- fix(types): replace
React_2
withReact
in generated .d.ts files