Skip to content

Commit bcfe4ce

Browse files
authored
Fix scroll reset of group address selector (#191)
1 parent 1da47f1 commit bcfe4ce

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/components/knx-group-address-selector.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ export class GroupAddressSelector extends LitElement {
8888
this.addressOptions = getAddressOptions(this.filteredGroupAddresses);
8989
}
9090

91+
protected shouldUpdate(changedProps: PropertyValues<this>) {
92+
// ignore hass updates to avoid scrolling reset of open dropdowns (when input filter is set)
93+
return !(changedProps.size === 1 && changedProps.has("hass"));
94+
}
95+
9196
protected willUpdate(changedProps: PropertyValues<this>) {
9297
if (changedProps.has("config")) {
9398
const selectedDPT = this.getValidDptFromConfigValue();

0 commit comments

Comments
 (0)