Skip to content

Commit

Permalink
v2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cibernox committed Nov 26, 2018
1 parent 0ee3526 commit dd302ac
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 136 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Master

# 2.2.0
- [BUGFIX] `{{power-select-multiple}}` should be a tagless component unless otherwise specified.

# 2.1.0
- [ENHANCEMENT] Create a new sass/less styles that are then imported from the main style. This should
not change the public API
Expand Down
16 changes: 9 additions & 7 deletions addon/components/power-select-multiple.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import layout from '../templates/components/power-select-multiple';
import fallbackIfUndefined from '../utils/computed-fallback-if-undefined';

export default Component.extend({
tagName: '',
layout,
// Config
triggerComponent: fallbackIfUndefined('power-select-multiple/trigger'),
Expand Down Expand Up @@ -46,15 +47,15 @@ export default Component.extend({
if (action && action(select, e) === false) {
return false;
}
this.focusInput();
this.focusInput(select);
},

handleFocus(select, e) {
let action = this.get('onfocus');
if (action) {
action(select, e);
}
this.focusInput();
this.focusInput(select);
},

handleKeydown(select, e) {
Expand Down Expand Up @@ -99,11 +100,12 @@ export default Component.extend({
},

// Methods
focusInput() {
if (!this.element) return;
let input = this.element.querySelector('.ember-power-select-trigger-multiple-input');
if (input) {
input.focus();
focusInput(select) {
if (select) {
let input = document.querySelector(`#ember-power-select-trigger-multiple-input-${select.uniqueId}`);
if (input) {
input.focus();
}
}
}
});
2 changes: 1 addition & 1 deletion addon/templates/components/power-select-multiple.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
placeholder=placeholder
placeholderComponent=placeholderComponent
preventScroll=preventScroll
registerAPI=(readonly registerAPI)
registerAPI=(action registerAPI)
renderInPlace=renderInPlace
required=required
scrollTo=scrollTo
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ember-power-select",
"version": "2.1.0",
"version": "2.2.0",
"description": "The extensible select component built for ember",
"keywords": [
"ember-addon",
Expand Down
Loading

0 comments on commit dd302ac

Please sign in to comment.