Skip to content

Convert hui-input-select-entity-row to TypeScript/LitElement#2048

Merged
balloob merged 5 commits intohome-assistant:devfrom
iantrich:ts-input-select
Nov 20, 2018
Merged

Convert hui-input-select-entity-row to TypeScript/LitElement#2048
balloob merged 5 commits intohome-assistant:devfrom
iantrich:ts-input-select

Conversation

@iantrich
Copy link
Copy Markdown
Member

No description provided.

@ghost ghost assigned iantrich Nov 13, 2018
@ghost ghost added the in progress label Nov 13, 2018
(option) =>
html`
<paper-item
@click="${() => this._selectedChanged(option as string)}"
Copy link
Copy Markdown
Member

@balloob balloob Nov 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't do this. Instead mimic how the old component behaved: observing selected-item-label (as seen by it using {…} which indicates 2 way databinding). You can do this by listening to the selected-item-label-changed event on <paper-dropdown-menu> like the original did. Don't attach individual listeners to each item.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully I didn't botch that too much with the commit I just pushed (it works) :) I was pretty unsure of what I was doing with this listener.

@ghost ghost assigned balloob Nov 20, 2018
@balloob balloob merged commit a9704b1 into home-assistant:dev Nov 20, 2018
@ghost ghost removed the in progress label Nov 20, 2018
@iantrich iantrich deleted the ts-input-select branch December 8, 2018 06:13
@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants