Accessible rendering layer for Autosuggest and Autocomplete components
Add containerProps
aria-haspopup
isHighlighted
to renderItem
shouldRenderSection
prop was removedprop-types
instead of React.PropTypes
theme
keys changed:
inputFocus
=> inputFocused
itemHighlight
=> itemHighlighted
focusedSectionIndex
=> highlightedSectionIndex
focusedItemIndex
=> highlightedItemIndex
renderItemsContainer
signature changed - all the props that should be set on the items container are nested in containerProps
now. The new signature is:function renderItemsContainer({ children, containerProps })
theme
updated to better support inline styles:
inputOpen
inputFocus
itemsContainerOpen
sectionContainerFirst
itemFocused
=> itemHighlight
inputComponent
was removed in favor of the new renderInputComponent
.When using renderInputComponent
, make sure to pass through the inputProps
that you get to the <input>
element.
For example:
const renderInputComponent = inputProps => {
const style = {
<some styles>
};
return (
<div>
<input style={style} {...inputProps} />
{<your custom stuff>}
</div>
);
};
Renamed inputElement
to inputComponent
.
As opposed inputElement
, inputComponent
cannot be a string (e.g. 'textarea'
). This important restriction was introduced to keep Autowhatever accessible.
Added inputElement
prop