Skip to content

Commit

Permalink
fix(limel-chip-set): change name of method focus to setFocus
Browse files Browse the repository at this point in the history
`focus` is a reserved public name on HTML elements.

BREAKING CHANGE: The method `focus()` on `limel-chip-set` has been renamed to `setFocus()`.
  • Loading branch information
adrianschmidt committed Sep 10, 2019
1 parent c68a3a4 commit b73ed1c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/components/chip-set/chip-set.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,13 @@ export class ChipSet {
this.handleTextInput = this.handleTextInput.bind(this);
}

/**
* Used to set focus to the chip-set input field.
*
* @returns {void}
*/
@Method()
public focus() {
public setFocus() {
this.editMode = true;
this.host.shadowRoot.querySelector('input').focus();
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/picker/picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export class Picker {
}

const chipSet = this.element.shadowRoot.querySelector('limel-chip-set');
chipSet.focus();
chipSet.setFocus();
}

public componentDidLoad() {
Expand Down

0 comments on commit b73ed1c

Please sign in to comment.