Repository navigation
v0.169.0
Minor Changes
-
#1357
b9b4cf92Thanks @tenphi! - Add a properautoCompleteprop to the text-input family.TextInput,TextArea,PasswordInput,SearchInput,NumberInput,CommandTextAreaandTextInputMapper(throughkeyProps/valueProps) now acceptautoCompletein the standard React casing, andInlineInputgained the prop as well. The lowercaseautocompleteprop still works as a deprecated alias;autoCompletewins when both are set.Previously the camelCase prop — the one React Aria's own types advertise — was silently dropped, and the attribute was written unconditionally after
inputPropswas merged, so it also overwrote anautoCompletecoming frominputPropsor from a React Aria hook withundefined. As a resultNumberInputnow renders theautocomplete="off"thatuseNumberFieldasks for.
Patch Changes
-
#1354
b6d51af1Thanks @tenphi! - Import defining files directly instead of through barrels along theRoot→AlertDialog→Dialogchain, and replace everyfrom '…/icons'barrel import inside the library with a direct icon import. Nothing about the public API changes — the barrels still re-export everything — but the module graph gets narrower: pulling inRootno longer transitively drags inMenu,CommandMenu,Formand all 133 icon components, which is both better for a consumer's tree-shaking and what lets Chromatic's TurboSnap scope a build to the stories a change actually affects. -
#1354
b6d51af1Thanks @tenphi! - Field labels show their necessity indicator again, and a requiredComboBoxsays so to assistive technology.Labelonly appended the*/(required)/(optional)marker when its child was plain text, andFieldWrapper— which every labelled input goes through — always hands it an element tree, soisRequiredandnecessityIndicatorreached the label and rendered nothing. The marker now comes from a sharedNecessityIndicatorMark, whichFieldWrapperplaces against the label text rather than after the full-width row. Separately,ComboBoxbuilds its own trigger instead of going through a react-aria field hook and never forwardedisRequiredto it, so a required combobox rendered markup byte-identical to an optional one — noaria-required, nothing for a screen reader to announce. Ten other components still have that second gap (Select,Picker,FilterPicker,ListBox,FilterListBox,Switch,Slider,ColorInput,SearchComboBox,FileInput); they are unchanged here. -
#1359
1cf5c9f6Thanks @tenphi! -DialogTrigger: makeshouldCloseOnInteractOutsideactually reach the popover.The prop was inert for a popover type Dialog.
PopoverTriggerwraps the caller's predicate in its own resolver, and that resolver consulted the predicate last — after the automatic behaviours. EveryButtonandItemButtoncarriesdata-popover-dismiss, so the auto-dismiss branch matched first, scheduled the close and returned, and the predicate was never called. A caller could not keep a popover open for a chosen element: it closed on every outside interaction regardless of what the predicate would have said.The predicate is now asked first, so an explicit "keep me open for this element" wins over the automatic dismiss. Returning
falsestill lets the click through to the control that was pressed (the resolver only reports "close" when the popover really should close, which is what stops React Aria from swallowing the click), so a guarded button both keeps the popover open and runs its ownonPress.One thing to know when writing the predicate: React Aria passes the element the pointer landed on, which for a
Buttonis the label inside it rather than the<button>itself. Guard withcontains(), not an identity check —(el) => !myRef.current?.UNSAFE_getDOMNode()?.contains(el).Nothing changes for callers that never passed the prop: without a predicate the resolver behaves exactly as before.