zigbee2mqtt-frontend icon indicating copy to clipboard operation
zigbee2mqtt-frontend copied to clipboard

Keyboard changes on RangeEditor does not trigger API update

Open larsjohnsen opened this issue 1 year ago • 0 comments

It seems like the onChange function passed in props is not invoked when the input element's change event is emitted. Instead, it is only invoked on events touchend and mouseup. A consequence is that making gradual adjustments to a device's brightness with the keyboard is not possible, since no API call is triggered.

Adding onChange(e.target.valueAsNumber) to the change event listener might also make the touchend and mouseup listeners redundant.

Related code: https://github.com/nurikk/zigbee2mqtt-frontend/blob/a75ccbda42d294f7d88eab9099b5bb7eed370ddb/src/components/range-editor/range-editor.tsx#L36

https://github.com/nurikk/zigbee2mqtt-frontend/blob/a75ccbda42d294f7d88eab9099b5bb7eed370ddb/src/components/range-editor/range-editor.tsx#L48

larsjohnsen avatar Dec 17 '23 20:12 larsjohnsen