Releases: 5rabbits/portrait
Releases · 5rabbits/portrait
v0.9.0
v0.8.2
v0.8.1
v0.8.0
Breaking changes
Selectable
now exposes helper methods to get props for options, search input and overflow container. This allows us to add common use cases features without modifying any markup. Of course all the default behaviour can be completely replaced if you need more control.
These are the changes:
- Added
blurOnSelect
(false
by default). Causes the control to lose focus after selecting an option. - Added
optionHeight
(disabled by default). Defines a fixed option height to enable scroll virtualization. - The
renderer
now gets new properties:getInputProps(otherProps = {})
: Default props for the search input. Automatically handles filtering and keyboard navigation.getOptionProps(option, otherProps = {})
: Default props for options. Automatically handles selection by click, focusing on mouse enter and some functional styling (mainly for virtual scroll).getContainerProps(otherProps = {})
: Default props for the options container. IfoptionHeight
is defined and the container has a fixed height (height
ormax-height
), automatically enables and handles virtual scroll to render a massive amount of options with good performance.viewportOptions
: Array of options that are in the current container viewport. Contains all options if virtual scroll is disabled.
- Properties removed from
renderer
:overflowRef
(included ingetContainerProps
).