Skip to content

Releases: floating-ui/floating-ui

@floating-ui/react@0.26.16

20 May 02:28
1a2070e
Compare
Choose a tag to compare

Patch Changes

  • fix(useListNavigation): correct scrollIntoView and focus 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

20 May 02:28
1a2070e
Compare
Choose a tag to compare

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

20 May 02:28
1a2070e
Compare
Choose a tag to compare

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

15 May 11:08
58ed169
Compare
Choose a tag to compare

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

15 May 11:08
58ed169
Compare
Choose a tag to compare

Patch Changes

  • fix(size): correctly constrain floating element to avoid overflowing outside viewport with shift({crossAxis: true})

@floating-ui/react@0.26.14

13 May 04:04
a5ba5da
Compare
Choose a tag to compare

Patch Changes

  • feat: add useFloatingRootContext Hook, which enables calling interaction hooks in a component higher in the tree than useFloating is called in. This supports spreading reference props onto an "external" reference element. External reference documentation.

@floating-ui/dom@1.6.5

05 May 01:33
7ee1281
Compare
Choose a tag to compare

Patch Changes

  • fix: correctly calculate <svg> arrow element offsetParent. 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

28 Apr 10:31
dd20eeb
Compare
Choose a tag to compare

Patch Changes

  • fix: avoid spreading rects to support DOMRect types

@floating-ui/react@0.26.13

28 Apr 10:31
dd20eeb
Compare
Choose a tag to compare

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 with React in generated .d.ts files
  • fix(types): revert React.JSX.Element back to JSX.Element
  • fix(useHover): restMs + nullish open delay should respect restMs

@floating-ui/react-native@0.10.5

28 Apr 10:31
dd20eeb
Compare
Choose a tag to compare

Patch Changes

  • fix(types): replace React_2 with React in generated .d.ts files