# Changelog ## 17.3.2 - Do not re-compute `isBusy` if already busy ## 17.3.1 - Remove use of `@action` ## 17.3.0 - Convert to v2 addon ## 17.2.1 - Prevent mouse events from interfering with keyboard navigation, when the mouse is over the options. ## 17.2.0 - Remove `return false` from `@onSelect` as a means to close the dropdown. Prefer using the dropdown API directly. ## 17.1.6 - Change sorting algorithm again ## 17.1.5 - Remove closure `@destination` ## 17.1.4 - Account for custom markup when sorting options internally ## 17.1.3 - Miniscule performance improvement ## 17.1.2 - Change internal option sort function ## 17.1.1 - Fix internal order of options when used with `#in-element` ## 17.1.0 - Add `@destination` argument to dropdown content ## 17.0.1 - Fix selecting text in `sb.Input` ## 17.0.0 - Add dropdown primitive ## 16.4.0 - Don't allow focus to move to listbox, when in a combbox (avoids keyboard-focusable-scroller behaviour) - Use touch events instead of focus out on touch devices to determine when to close. - Remove cycling options, to get closer to native behaviour ## 16.3.1 - Maintain visibility of current option after search ## 16.3.0 - Remove use of `@ember/render-modifiers` ## 16.2.4 - Expose `startsWithString` search util ## 16.2.3 - Do not call `scrollIntoView` on initial render ## 16.2.2 - Use optional chaining in js land, to match behaviour of htmlbars ## 16.2.1 - Ensure changing the value via `@value` or via the API also updates the current option ## 16.2.0 - Fix an issue where on initial render the `aria-selected` option did not also have `aria-current` ## 16.1.4 - Convert to `.gjs` - Correct app re-export ## 16.1.3 - Run ember-cli-update - Upgrade dependencies - Convert tests to `.gjs` ## 16.1.2 - Update `@zestia` scoped packages ## 16.1.1 - Re-release of 16.1.0 but published to GH Packages instead of NPM ## 16.1.0 - Upgrade dependencies ## 16.0.3 - Remove use of Array.at ## 16.0.2 - Improve performance of option teardown ## 16.0.1 - Only left button performs selection ## 16.0.0 - [Migration guide](docs/migration-16.md) ## 16.0.0-14 - Do no scroll if space is pressed when typing ## 16.0.0-13 - Enter on trigger should not toggle ## 16.0.0-12 - Revert [Fix FF tab order](https://bugzilla.mozilla.org/show_bug.cgi?id=1721401) ## 16.0.0-11 - Fix pressing Enter behaviour inside a form - Fix FF tab order ## 16.0.0-10 - Add `ember-auto-import` to dependencies ## 16.0.0-9 - Allow escape to work when nested ## 16.0.0-8 - Fix Enter/Space closing multiple select boxes ## 16.0.0-7 - Don't activate first option ## 16.0.0-6 - Only apply `aria-activedescendent` to the interactive element when necessary - Only add document level event listener when necessary ## 16.0.0-5 - Up arrow also opens the select box - Active option is forgotten when closing ## 16.0.0-4 - Ensure clicking a disabled option does not close the select box ## 16.0.0-3 - Ensure select box does not open when pressing Enter inside the input, if a form is to be submitted ## 16.0.0-2 - Keep open when document is hidden ## 16.0.0-1 - Re-release of 16.0.0-0 ## 16.0.0-0 - Large refactor to fix some incorrect uses of aria attributes and to dry out common select box behaviour ## 15.4.3 - Allow setting tabindex via an argument on an Option. [Reason](https://github.com/emberjs/rfcs/issues/497) ## 15.4.2 - Allow setting class attribute via an argument on an option. [Reason](https://github.com/emberjs/rfcs/issues/497) - Upgrade dependencies ## 15.4.1 - Fix not being able to set initial input value via yielded API ## 15.4.0 - Doesn't render `aria-multiselectable=false`, when not relevant - Fix space character usage in `activateOptionForKeyCode` - Correct app re-exports - Ember Auto Import 2x - Run ember-cli-update ## 15.3.2 - Upgrade `@embroider/util` ## 15.3.1 - Upgrade dependencies - Strip whitespace from inside empty elements, to allow CSS `:empty` ## 15.3.0 - REVERT change in 15.2.0. `keydown` should indeed select options. This is how a native select box works. - Allow `Space` to select an option similar to `Enter` ## 15.2.0 - Upgrade dependencies - Add Embroider support - Where possible, `keyup` is [preferred](https://github.com/ember-template-lint/ember-template-lint/blob/master/docs/rule/no-down-event-binding.md) over `keydown` ## 15.1.3 - Upgrade dependencies ## 15.1.2 - Make sure `id` can be set ## 15.1.1 - Upgrade dependencies ## 15.1.0 - Add `group` role to groups - Add `aria-labelledby` to groups - Add `aria-labelledby` to select boxes - Add `aria-owns` to select boxes - Run speed tests as production build ## 15.0.0 - Release changes from 15.0.0-beta - Run ember-cli-update ## 15.0.0-beta.9 - Make sure yielded-template-API is the same instance as the callback-based-API. - Drop support for Ember 3.16 - Fix failing tests in beta versions of Ember - Upgrade dependencies ## 15.0.0-beta.8 - Add regression test for typeahead with repeating character ## 15.0.0-beta.7 - Simplify typeahead checks - Upgrade dependencies ## 15.0.0-beta.6 - Add some missing tests ## 15.0.0-beta.5 - Correct ember-source dependancy ## 15.0.0-beta.4 - Fixed backtracking issues with beta versions of Ember ## 15.0.0-beta.3 - Removed `data-` attributes, `@classNamePrefix` and `@onBuildClassName` in a bid to reduce API surface - Removed stateful BEM class names, like `select-box__option--selected` in favour of aria attributes - Removed `onInsertElement` (`@onReady` suffices) - Removed `sb.Group` for native select box. `optgroup` can be used instead - Removed `@onInput` from `sb.Input` component. This action wasn't providing anything different than what can be acheived by using `{{on "input"}}` - Removed ability to set a `@value` on a selected option, and activate that selected option. - `SelectedOption`, `SelectedOptions`, `Group` and `Options` are now just dumb template only components. They weren't removed altogether, because they still prove useful for higher order components with the component helper. - Upgrade dependencies ## 15.0.0-beta.2 - Fix debounced searched attempts if `@searchDelayTime` is 0 ## 15.0.0-beta.1 - Small internal refactor around focusing ## 15.0.0-beta.0 - Remove `onFocusIn` and `onFocusOut` actions, these don't provide anything different than what can be acheived by using `{{on "focusin"}}` and `{{on "focusout"}}`. - Add `onFocusLeave` which fires when focus leaves the select box. This is useful for closing the select box when tabbing away. - Remove `onClickOutside` in favour of `onFocusLeave`. (This removed the need for event listeners on the document). ## 14.0.4 - Upgrade dependencies ## 14.0.3 - Upgrade dependencies - Activating options no longer waits for render before attempting to scroll into view (this responsibility is shifted to the user of the addon) ## 14.0.2 - Support setting type of input when used with component helper - Support setting role of selected option when used with component helper ## 14.0.1 - Remove custom scroll into view code, in favour of browsers' own version - Run prettier - Upgrade dependencies ## 14.0.0 - Release changes from 14.0.0-beta ## 14.0.0-beta.1 - Fix API be re-computed during teardown causing rendering issue ## 14.0.0-beta.0 - Glimmerise component - Drop support for Ember < 3.16 ## 13.0.9 - Allow tabindex to be set on selected options with a temporary fix, due to: https://github.com/emberjs/rfcs/issues/497 ## 13.0.8 - Upgrade dependencies ## 13.0.7 - Use capture on document listener for detecting when something outside of a select box is clicked. (This fixes an issue where it wasn't possible to close a select box onClickOutside, but also open it with a button outside of itself) - Upgade dependencies ## 13.0.6 - Upgrade dependencies ## 13.0.5 - Add [`@onBuildClassName`](docs/class-names.md) ## 13.0.4 - Prevent errors if API is used and select box is destroyed ## 13.0.3 - Improvement: Options's indexes are stable against the correct DOM order - Internal: Add data attribute to distinguish between types of child components registered with parent select box. - Internal: Register components on insert rather than init to ensure DOM node available ## 13.0.2 - Only prevent default if target of Enter key-down event was a select box component. (This allows children, typically hyperlinks inside options to still work by pressing Enter) ## 13.0.1 - Apply same fix for focus-in as focus-out. ## 13.0.0 - Drop support for < Ember 3.11 - Key down event is now `defaultPrevented` if pressing Enter resulted in an option being selected. (Forms can still be submitted by pressing Enter). ## 12.2.1 - Upgrade dependencies ## 12.2.0 - Adds `activateOptionForValue` - API methods that accepted a boolean option, signifying whether to scroll to an option, now accept an object with a property `{ scrollIntoView: bool }` instead. ## 12.1.0 - Rename `@onInit` to `@onReady` ## 12.0.0 - Switch to BEM syntax for markup - Remove `class-name-prefix` helper ## 11.0.1 - Unpin render modifier dependancy ## 11.0.0 - Release changes from version 10.0.9-beta ## 10.0.9-beta.5 - Fix performance regression - Add regression test ## 10.0.9-beta.4 - Correct use of `scheduleOnce` - Fix calling `set` on destroyed select box ## 10.0.9-beta.3 - Fix use with Promise Proxy Objects ## 10.0.9-beta.2 - Make sure options have element IDs so that aria-activedescendant works correctly ## 10.0.9-beta.1 - Remove use of `{{on}}` helper due to lack of splattributes forwarding. ## 10.0.9-beta.0 - Internal refactoring removing use of `Mixin.create()` - Internal refactoring to Angle Bracket components / splattributes - Removed `is-searching` class name in favour of `is-busy` and/or aria attribute - Rename `stopSearching` to `cancelSearch` - Removed `@open` argument. (Please use the API instead) - Change signature of `onUpdate`, now receives API as first argument - Normalise API properties with template properties ## 10.0.8 - Upgrade deps ## 10.0.7 - Add missing test case for finding matching options ## 10.0.6 - Collapse whitespace when finding matching options using `sb.activateOptionForKeyCode` ## 10.0.5 - Upgrade dependencies ## 10.0.4 - Fix restroring tabindex, when disabling, then un-disabling a select box. ## 10.0.3 - Upgrade dependencies ## 10.0.2 - Add style attribute binding support for those who still use classic components ## 10.0.1 - Only attempt `activateOptionForKeyCode` if the key pressed resulted in a character being input ## 10.0.0 - `@onPressKey` is now backed by a key press event, rather than an abstracted key down event - Deprecated `@onPressAlphanum`. If you were using this, please swap it to `@onPressKey` - [Improved](https://github.com/zestia/ember-select-box/blob/5006a7033e1df514a8979fce205b21b77e5ee69d/tests/integration/components/select-box/activating-options-test.js#L146-L282) `activateOptionForKeyCode` to behave more like native select boxes. ## 9.0.1 - Upgrade dependencies - Remove jQuery from dummy test app ## 9.0.0 - Remove support for automatic escaping of style attribute, this no longer makes sense after the move to named arguments / angle bracket components. Please swap `@style=` to `style=` ## 8.0.5 - Add isDestroying guard ## 8.0.4 - Move location of test helpers to proper ember-cli location. See readme for import. - Use alternative approach for [backtracking](tests/acceptance/backtracking-test.js) [issue](https://github.com/emberjs/ember.js/issues/18043) ## 8.0.3 - Make input actions more fail silently if no input present ## 8.0.2 - Make sure tabindex updates automatically if `` is present or not ## 8.0.1 - Fix backracking regression ## 8.0.0 - Switches from snake case arguments to camel case,
Upgrading should be an easy find-and-replace. For example: `sb.selected-option` → `sb.SelectedOption` - `class-prefix` renamed to `@classNamePrefix` ## 7.2.3 - Use get/set helpers - Guard more cases where component might set when destroyed ## 7.2.2 - ARIA: Make sure input knows it controls combo box - ARIA: Make sure attributes are _strings_ ## 7.2.1 - Send event out with `on-click-outside` action ## 7.2.0 - Rename `@is-open` argument to `@open` to align with other args. ## 7.1.0 - Phase out internal method's like `press() {}` in favour of actions, like `on-press-={{action "doSomething"}}`. - Add `on-press-alphanum` action ## 7.0.5 - Listen for touchstart so that clicking _outside_ a select box can be detected on mobile devices. ## 7.0.4 - Upgrade ember-cli ## 7.0.3 - Add missing `on-activate` action to selected options ## 7.0.2 - Fix error if no active option available to scroll into view ## 7.0.1 - Fix typo ## 7.0.0 - Move native selectbox from `{{select-box/native}}` to `{{native-select-box}}` for nicer integration with angle bracket components. ## 6.1.3 - Upgrade deps - Fix support for Ember 2.10 - Fixes to the demos ## 6.1.2 - Use named arguments and fix no implicit this ## 6.1.0 - Update to use named arguments - Fix use of `.send` on destroyed/ing component ## 6.0.4 - Expose `isOpen` state on the yielded API as well as the template API. ## 6.0.3 - Fix an issue introduced in 6.0.2 where mousing over an option would cause it to be scrolled to. - Updated readme to better explain the behaviour of the `activate` actions. ## 6.0.2 - `activateNextOption` and `activatePreviousOption` default to scrolling the parent element. So there is no longer the requirement to pass in `true`, like `sb.activateNextOption(true)`. But, you can of course send in false if you don't want this behaviour. - Adds a new API function `activateOptionForKeyCode` which will make your select box behave more like a native selectbox, in that by typing characters an option whose `textContent` matches will be activated. It may not be suitable to use this feature if the selectbox also has an input field as the behaviours will likely conflict, but this will depend on your usecase. ## 6.0.1 - Fixes test helpers that select multiple options ## 6.0.0 - Improvements to aria attributes (Corrects listbox role. Adds combobox role when appropriate. Adds aria-busy) - Changes to mixin file locations - Exposes some test helpers for selecting values - Removes jQuery from test suite ## 5.0.0 - Option's yielded properties are now prefixed with `is`, e.g. `{{o.isSelected}}` - Option label attribute has been removed to align better with native select boxes. To migrate, change `{{sb.option label="Foo"}}` to `{{#sb.option}}Foo{{/sb.option}}`. [More](https://github.com/zestia/ember-select-box/issues/9#issuecomment-370250705). - Selected box now yields promise state of the value, e.g. `isPending`, `isRejected`, `isFulfilled`, `isSettled` - Native select box option now uses same template as Faux select box option template. ## 4.2.3 - Internal changes - One way value attributes ## 4.2.2 - Remove `invokeAction` util ## 4.2.1 - `value` for a multiple select can now be a promise for an array, whereas originally it was always expecting an array. - Removes `on-build-selection` from native select component ## 4.2.0 - Previously, the behaviour of selecting multiple options with the faux-select component was undefined. With the intention that developers use `sb.update(myValues)` to implement the multiple behaviour they want. But, it is rare you want anything other than to mimic a native select, by toggling the selected item from the array of values. Hence this is now the default behaviour. More info: https://github.com/zestia/ember-select-box/pull/15. A new action `on-build-selection` allows you to customise this. - When using a multiple select box, the `on-select` action will fire with an array of the selected values. This array is frozen, and is not the same as the one passed into the select box originally. ## 4.1.0 - Changes `scrollIntoView` signature. Now finds the first scrollable parent, and scrolls that rather than assuming the select box options will be the scrollable element. ## 4.0.1 - Make select box support style attribute ## 4.0.0 - Yield the main select box element on the api - Run [codemod](https://github.com/rwjblue/ember-qunit-codemod) on test sutie - Change path to certain mixins ## 3.0.10 - Fix travis builds - Fix dependencies ## 3.0.9 - Lint everything ## 3.0.7 - Add `blurInput` to API ## 3.0.6 - Minor changes to tests ## 3.0.5 - Update tests to work with Ember 2.15x as per https://github.com/emberjs/ember.js/issues/15569 ## 3.0.4 - Adds a `on-init` action, useful for getting the select box's api ## 3.0.3 - Don't try to re-render if destroyed ## 3.0.2 - Adds `is-multiple` class to faux select box when `multiple=true` ## 3.0.1 - Adds ability to disable a faux option ## 3.0.0 - Make input way one again (accidently introduced two-way binding in 2.0.0) ## 2.0.0 - Phases out some use of jQuery - Select box input extends Ember's built-in text field helper ## 1.2.1 - Don't use jQuery's trim ## 1.2.0 - Adds `on-open` and `on-close` actions - Update dependencies - Use new imports ## 1.1.19 - Add better `trySet` whilst issue is still open ## 1.1.18 - Only set property if component not destroyed ## 1.1.17 - Make more reliable when toggling visibilty of options container ## 1.1.16 - Make sure toggle uses open and close actions ## 1.1.15 - Yield open state ## 1.1.14 - move ember-improved-cp to dependencies ## 1.1.13 - Eslint ## 1.1.12 - Remove use of `getAttr` ## 1.1.11 - Upgrade dependencies (babel 6 etc..) ## 1.1.10 - Upgrade dependencies ## 1.1.9 - Allow more attributes on the select box input ## 1.1.8 - Fastboot fixes ## 1.1.7 - Upgrade ember-cli ## 1.1.6 - Upgrade ember-cli ## 1.1.5 - Small bug fix ## 1.1.4 - Add support for options with promise values ## 1.1.3 - A few improvements around promises ## 1.1.2 - Add fix and regression test to make sure `on-update` is firing correctly ## 1.1.1 - Make sure there is no error if select box is destroyed ## 1.1.0 - Adds support for promise values ## 1.0.6 - Add support for plain `