Skip to content

Commit

Permalink
refactor(limel-chip-set): move method higher up in file and watcher f…
Browse files Browse the repository at this point in the history
…urther down
  • Loading branch information
adrianschmidt committed Sep 10, 2019
1 parent 703d6e6 commit c68a3a4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/components/chip-set/chip-set.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@ export class ChipSet {
this.handleTextInput = this.handleTextInput.bind(this);
}

@Watch('value')
public handleChangeChips() {
this.textValue = ' ';
@Method()
public focus() {
this.editMode = true;
this.host.shadowRoot.querySelector('input').focus();
}

public componentDidLoad() {
Expand Down Expand Up @@ -129,12 +130,6 @@ export class ChipSet {
}
}

@Method()
public focus() {
this.editMode = true;
this.host.shadowRoot.querySelector('input').focus();
}

public render() {
if (this.type === 'input') {
return this.renderInputChips();
Expand All @@ -152,6 +147,11 @@ export class ChipSet {
);
}

@Watch('value')
protected handleChangeChips() {
this.textValue = ' ';
}

private createMDCChipSet() {
this.mdcChipSet = new MDCChipSet(
this.host.shadowRoot.querySelector('.mdc-chip-set')
Expand Down

0 comments on commit c68a3a4

Please sign in to comment.