ariakit@2.0.0-next.23
Pre-releaseMajor Changes
-
Dropped support for React 16. (#1225)
The package may still work with React 16.8, but we're not testing the codebase against this version anymore. Upgrade to React 17 or higher to guarantee that your app works with Ariakit.
-
Dropped support for
auto,auto-startandauto-endplacements onusePopoverStateand derived state hooks. (#1229) -
Replaced
defaultAnchorRect,anchorRectandsetAnchorRectprops onusePopoverStateby a singlegetAnchorRectprop. (#1252)Before:
const popover = usePopoverState(); // inside an effect or event handler popover.setAnchorRect({ x: 10, y: 10 });
After:
const popover = usePopoverState({ getAnchorRect: () => ({ x: 10, y: 10 }) });
-
The
paddingprop has been renamed tooverflowPaddingonusePopoverStateand derived state hooks. (#1229)const popover = usePopoverState({ - padding: 4, + overflowPadding: 4, }); -
The
shiftandgutterprops onusePopoverStateand derived state hooks don't support string values anymore. Now only numbers are supported. (#1229) -
The
preventOverflowprop has been renamed toslideonusePopoverStateand derived state hooks. (#1229)const popover = usePopoverState({ - preventOverflow: false, + slide: false, });
Minor Changes
-
The
setValueOnClickprop fromComboboxItemnow also supports a function that receives the click event and returns a boolean value. -
Added
setValueOnChangeprop toCombobox. -
Added
setValueOnClickprop toCombobox. -
Added
fitViewportprop tousePopoverStateand derived state hooks. (#1229) -
Added
overlapprop tousePopoverStateand derived state hooks. (#1229)
Patch Changes
-
Fixed
ComboboxwithautoSelectandautoComplete="both"props setting an incorrect value when there are no matches. (#1219) -
Fixed
useDisclosureStatereading from a mutating ref on the render phase. (#1224) -
Fixed extra re-renders on
FormField,FormInput,FormCheckboxandFormErrorcomponents when they have been touched. -
Fixed a bug where quickly hovering over nested
Hovercardcomponents right after they were mounted would cause the parent and the nestedHovercardto hide. (#1229) -
Fixed how the "transit polygon" is shaped on
Hovercardto make it easier to hover over adjacent elements. (#1240) -
Fixed types for
@types/reactv18. (#1222) -
Updated dependencies:
ariakit-utils@0.17.0-next.16.